backends: Make MetaHwCursorInhibitor less about sprites
Remove the sprite argument from the vfunc, it's used in no implementations and conceptually gets a bit in the middle. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403>
This commit is contained in:
parent
00cbcb7ba1
commit
e218b00747
@ -82,13 +82,12 @@ static guint signals[LAST_SIGNAL];
|
|||||||
G_DEFINE_TYPE_WITH_PRIVATE (MetaCursorRenderer, meta_cursor_renderer, G_TYPE_OBJECT);
|
G_DEFINE_TYPE_WITH_PRIVATE (MetaCursorRenderer, meta_cursor_renderer, G_TYPE_OBJECT);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_hw_cursor_inhibitor_is_cursor_sprite_inhibited (MetaHwCursorInhibitor *inhibitor,
|
meta_hw_cursor_inhibitor_is_cursor_inhibited (MetaHwCursorInhibitor *inhibitor)
|
||||||
MetaCursorSprite *cursor_sprite)
|
|
||||||
{
|
{
|
||||||
MetaHwCursorInhibitorInterface *iface =
|
MetaHwCursorInhibitorInterface *iface =
|
||||||
META_HW_CURSOR_INHIBITOR_GET_IFACE (inhibitor);
|
META_HW_CURSOR_INHIBITOR_GET_IFACE (inhibitor);
|
||||||
|
|
||||||
return iface->is_cursor_sprite_inhibited (inhibitor, cursor_sprite);
|
return iface->is_cursor_inhibited (inhibitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -499,8 +498,7 @@ meta_cursor_renderer_remove_hw_cursor_inhibitor (MetaCursorRenderer *renderer
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_cursor_renderer_is_hw_cursors_inhibited (MetaCursorRenderer *renderer,
|
meta_cursor_renderer_is_hw_cursors_inhibited (MetaCursorRenderer *renderer)
|
||||||
MetaCursorSprite *cursor_sprite)
|
|
||||||
{
|
{
|
||||||
MetaCursorRendererPrivate *priv =
|
MetaCursorRendererPrivate *priv =
|
||||||
meta_cursor_renderer_get_instance_private (renderer);
|
meta_cursor_renderer_get_instance_private (renderer);
|
||||||
@ -510,8 +508,7 @@ meta_cursor_renderer_is_hw_cursors_inhibited (MetaCursorRenderer *renderer,
|
|||||||
{
|
{
|
||||||
MetaHwCursorInhibitor *inhibitor = l->data;
|
MetaHwCursorInhibitor *inhibitor = l->data;
|
||||||
|
|
||||||
if (meta_hw_cursor_inhibitor_is_cursor_sprite_inhibited (inhibitor,
|
if (meta_hw_cursor_inhibitor_is_cursor_inhibited (inhibitor))
|
||||||
cursor_sprite))
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,8 +38,7 @@ struct _MetaHwCursorInhibitorInterface
|
|||||||
{
|
{
|
||||||
GTypeInterface parent_iface;
|
GTypeInterface parent_iface;
|
||||||
|
|
||||||
gboolean (* is_cursor_sprite_inhibited) (MetaHwCursorInhibitor *inhibitor,
|
gboolean (* is_cursor_inhibited) (MetaHwCursorInhibitor *inhibitor);
|
||||||
MetaCursorSprite *cursor_sprite);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define META_TYPE_CURSOR_RENDERER (meta_cursor_renderer_get_type ())
|
#define META_TYPE_CURSOR_RENDERER (meta_cursor_renderer_get_type ())
|
||||||
@ -73,8 +72,7 @@ void meta_cursor_renderer_add_hw_cursor_inhibitor (MetaCursorRenderer *render
|
|||||||
void meta_cursor_renderer_remove_hw_cursor_inhibitor (MetaCursorRenderer *renderer,
|
void meta_cursor_renderer_remove_hw_cursor_inhibitor (MetaCursorRenderer *renderer,
|
||||||
MetaHwCursorInhibitor *inhibitor);
|
MetaHwCursorInhibitor *inhibitor);
|
||||||
|
|
||||||
gboolean meta_cursor_renderer_is_hw_cursors_inhibited (MetaCursorRenderer *renderer,
|
gboolean meta_cursor_renderer_is_hw_cursors_inhibited (MetaCursorRenderer *renderer);
|
||||||
MetaCursorSprite *cursor_sprite);
|
|
||||||
|
|
||||||
graphene_rect_t meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
|
graphene_rect_t meta_cursor_renderer_calculate_rect (MetaCursorRenderer *renderer,
|
||||||
MetaCursorSprite *cursor_sprite);
|
MetaCursorSprite *cursor_sprite);
|
||||||
|
@ -568,8 +568,7 @@ meta_screen_cast_area_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc *s
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_screen_cast_area_stream_src_is_cursor_sprite_inhibited (MetaHwCursorInhibitor *inhibitor,
|
meta_screen_cast_area_stream_src_is_cursor_inhibited (MetaHwCursorInhibitor *inhibitor)
|
||||||
MetaCursorSprite *cursor_sprite)
|
|
||||||
{
|
{
|
||||||
MetaScreenCastAreaStreamSrc *area_src =
|
MetaScreenCastAreaStreamSrc *area_src =
|
||||||
META_SCREEN_CAST_AREA_STREAM_SRC (inhibitor);
|
META_SCREEN_CAST_AREA_STREAM_SRC (inhibitor);
|
||||||
@ -580,8 +579,8 @@ meta_screen_cast_area_stream_src_is_cursor_sprite_inhibited (MetaHwCursorInhibit
|
|||||||
static void
|
static void
|
||||||
hw_cursor_inhibitor_iface_init (MetaHwCursorInhibitorInterface *iface)
|
hw_cursor_inhibitor_iface_init (MetaHwCursorInhibitorInterface *iface)
|
||||||
{
|
{
|
||||||
iface->is_cursor_sprite_inhibited =
|
iface->is_cursor_inhibited =
|
||||||
meta_screen_cast_area_stream_src_is_cursor_sprite_inhibited;
|
meta_screen_cast_area_stream_src_is_cursor_inhibited;
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaScreenCastAreaStreamSrc *
|
MetaScreenCastAreaStreamSrc *
|
||||||
|
@ -709,8 +709,7 @@ meta_screen_cast_monitor_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_screen_cast_monitor_stream_src_is_cursor_sprite_inhibited (MetaHwCursorInhibitor *inhibitor,
|
meta_screen_cast_monitor_stream_src_is_cursor_inhibited (MetaHwCursorInhibitor *inhibitor)
|
||||||
MetaCursorSprite *cursor_sprite)
|
|
||||||
{
|
{
|
||||||
MetaScreenCastMonitorStreamSrc *monitor_src =
|
MetaScreenCastMonitorStreamSrc *monitor_src =
|
||||||
META_SCREEN_CAST_MONITOR_STREAM_SRC (inhibitor);
|
META_SCREEN_CAST_MONITOR_STREAM_SRC (inhibitor);
|
||||||
@ -721,8 +720,8 @@ meta_screen_cast_monitor_stream_src_is_cursor_sprite_inhibited (MetaHwCursorInhi
|
|||||||
static void
|
static void
|
||||||
hw_cursor_inhibitor_iface_init (MetaHwCursorInhibitorInterface *iface)
|
hw_cursor_inhibitor_iface_init (MetaHwCursorInhibitorInterface *iface)
|
||||||
{
|
{
|
||||||
iface->is_cursor_sprite_inhibited =
|
iface->is_cursor_inhibited =
|
||||||
meta_screen_cast_monitor_stream_src_is_cursor_sprite_inhibited;
|
meta_screen_cast_monitor_stream_src_is_cursor_inhibited;
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaScreenCastMonitorStreamSrc *
|
MetaScreenCastMonitorStreamSrc *
|
||||||
|
@ -880,8 +880,7 @@ should_have_hw_cursor (MetaCursorRenderer *renderer,
|
|||||||
if (!cursor_sprite)
|
if (!cursor_sprite)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (meta_cursor_renderer_is_hw_cursors_inhibited (renderer,
|
if (meta_cursor_renderer_is_hw_cursors_inhibited (renderer))
|
||||||
cursor_sprite))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
for (l = gpus; l; l = l->next)
|
for (l = gpus; l; l = l->next)
|
||||||
|
Loading…
Reference in New Issue
Block a user