backends/native: Pass cursor transform from renderer to cursor manager
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3180>
This commit is contained in:
parent
5a05b1a901
commit
ca27dbabd9
@ -384,7 +384,9 @@ meta_cursor_renderer_native_update_cursor (MetaCursorRenderer *cursor_renderer,
|
||||
|
||||
meta_kms_cursor_manager_update_sprite (kms_cursor_manager,
|
||||
kms_crtc,
|
||||
NULL, NULL);
|
||||
NULL,
|
||||
META_MONITOR_TRANSFORM_NORMAL,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -657,6 +659,7 @@ load_cursor_sprite_gbm_buffer_for_crtc (MetaCursorRendererNative *native,
|
||||
meta_kms_cursor_manager_update_sprite (kms_cursor_manager,
|
||||
kms_crtc,
|
||||
buffer,
|
||||
transform,
|
||||
&hotspot);
|
||||
return TRUE;
|
||||
}
|
||||
@ -982,6 +985,7 @@ realize_cursor_sprite_from_wl_buffer_for_crtc (MetaCursorRenderer *renderer
|
||||
meta_kms_cursor_manager_update_sprite (kms_cursor_manager,
|
||||
kms_crtc,
|
||||
META_DRM_BUFFER (buffer_gbm),
|
||||
META_MONITOR_TRANSFORM_NORMAL,
|
||||
&GRAPHENE_POINT_INIT (hot_x, hot_y));
|
||||
|
||||
return TRUE;
|
||||
|
@ -49,6 +49,7 @@ typedef struct _CrtcStateImpl
|
||||
MetaKmsCrtc *crtc;
|
||||
graphene_rect_t layout;
|
||||
float scale;
|
||||
MetaMonitorTransform transform;
|
||||
MetaDrmBuffer *buffer;
|
||||
graphene_point_t hotspot;
|
||||
|
||||
@ -719,6 +720,7 @@ typedef struct
|
||||
{
|
||||
MetaKmsCrtc *crtc;
|
||||
MetaDrmBuffer *buffer;
|
||||
MetaMonitorTransform transform;
|
||||
graphene_point_t hotspot;
|
||||
} UpdateSpriteData;
|
||||
|
||||
@ -742,6 +744,7 @@ update_sprite_in_impl (MetaThreadImpl *thread_impl,
|
||||
|
||||
old_buffer = g_steal_pointer (&crtc_state_impl->buffer);
|
||||
crtc_state_impl->buffer = g_steal_pointer (&data->buffer);
|
||||
crtc_state_impl->transform = data->transform;
|
||||
crtc_state_impl->hotspot = data->hotspot;
|
||||
crtc_state_impl->cursor_invalidated = TRUE;
|
||||
|
||||
@ -764,6 +767,7 @@ void
|
||||
meta_kms_cursor_manager_update_sprite (MetaKmsCursorManager *cursor_manager,
|
||||
MetaKmsCrtc *crtc,
|
||||
MetaDrmBuffer *buffer,
|
||||
MetaMonitorTransform transform,
|
||||
const graphene_point_t *hotspot)
|
||||
{
|
||||
UpdateSpriteData *data;
|
||||
@ -771,6 +775,7 @@ meta_kms_cursor_manager_update_sprite (MetaKmsCursorManager *cursor_manager,
|
||||
data = g_new0 (UpdateSpriteData, 1);
|
||||
data->crtc = crtc;
|
||||
data->buffer = buffer ? g_object_ref (buffer) : NULL;
|
||||
data->transform = transform;
|
||||
if (hotspot)
|
||||
data->hotspot = *hotspot;
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <glib-object.h>
|
||||
#include <graphene.h>
|
||||
|
||||
#include "backends/meta-monitor-transform.h"
|
||||
#include "backends/native/meta-backend-native-types.h"
|
||||
#include "backends/native/meta-kms-types.h"
|
||||
#include "core/util-private.h"
|
||||
@ -54,6 +55,7 @@ void meta_kms_cursor_manager_position_changed_in_input_impl (MetaKmsCursorManage
|
||||
void meta_kms_cursor_manager_update_sprite (MetaKmsCursorManager *cursor_manager,
|
||||
MetaKmsCrtc *crtc,
|
||||
MetaDrmBuffer *buffer,
|
||||
MetaMonitorTransform transform,
|
||||
const graphene_point_t *hotspot);
|
||||
|
||||
META_EXPORT_TEST
|
||||
|
Loading…
Reference in New Issue
Block a user