magnifier: Use a ClutterContent to render mouse sprite

The Magnifier class uses a small subtree of actors to track the
current cursor's position and sprite. Specifically, it uses the
deprecated ClutterTexture to paint the cursor sprites.

Add a new, very simple ClutterContent implementation to track the
cursor sprite, and replace the ClutterTexture by a ClutterActor.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/371
This commit is contained in:
Georges Basile Stavracas Neto
2019-01-29 11:46:33 -02:00
parent 8f732e4f45
commit a7bb8ee639
3 changed files with 64 additions and 25 deletions

View File

@ -367,24 +367,6 @@ shell_util_create_pixbuf_from_data (const guchar *data,
(GdkPixbufDestroyNotify) g_free, NULL);
}
void
shell_util_cursor_tracker_to_clutter (MetaCursorTracker *tracker,
ClutterTexture *texture)
{
CoglTexture *sprite;
sprite = meta_cursor_tracker_get_sprite (tracker);
if (sprite)
{
clutter_actor_show (CLUTTER_ACTOR (texture));
clutter_texture_set_cogl_texture (texture, sprite);
}
else
{
clutter_actor_hide (CLUTTER_ACTOR (texture));
}
}
typedef const gchar *(*ShellGLGetString) (GLenum);
static const gchar *

View File

@ -44,9 +44,6 @@ GdkPixbuf *shell_util_create_pixbuf_from_data (const guchar *data,
int height,
int rowstride);
void shell_util_cursor_tracker_to_clutter (MetaCursorTracker *tracker,
ClutterTexture *texture);
gboolean shell_util_need_background_refresh (void);
ClutterContent * shell_util_get_content_for_window_actor (MetaWindowActor *window_actor,