clutter/paint-context: Add paint flag

A paint flag affects a paint operation in ways defined by the flags.
Currently no flags are defined, so no semantical changes are defined
yet. Eventually a flag aiming to avoid painting of cursors is going to
be added, so that screen cast streams can decide whether to include a
cursor or not.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1207
This commit is contained in:
Jonas Ådahl
2020-04-20 21:10:23 +02:00
parent 36111270aa
commit 1b33a5a3a7
6 changed files with 39 additions and 8 deletions

View File

@ -1270,7 +1270,8 @@ get_image_via_offscreen (MetaShapedTexture *stex,
root_node = clutter_root_node_new (fb, &clear_color, COGL_BUFFER_BIT_COLOR);
clutter_paint_node_set_static_name (root_node, "MetaShapedTexture.offscreen");
paint_context = clutter_paint_context_new_for_framebuffer (fb);
paint_context =
clutter_paint_context_new_for_framebuffer (fb, CLUTTER_PAINT_FLAG_NONE);
do_paint_content (stex, root_node, paint_context,
stex->texture,

View File

@ -1321,7 +1321,9 @@ meta_window_actor_blit_to_framebuffer (MetaScreenCastWindow *screen_cast_window,
cogl_framebuffer_scale (framebuffer, resource_scale, resource_scale, 1);
cogl_framebuffer_translate (framebuffer, -x, -y, 0);
paint_context = clutter_paint_context_new_for_framebuffer (framebuffer);
paint_context =
clutter_paint_context_new_for_framebuffer (framebuffer,
CLUTTER_PAINT_FLAG_NONE);
clutter_actor_paint (actor, paint_context);
clutter_paint_context_destroy (paint_context);
@ -1479,7 +1481,9 @@ meta_window_actor_get_image (MetaWindowActor *self,
cogl_framebuffer_scale (framebuffer, resource_scale, resource_scale, 1);
cogl_framebuffer_translate (framebuffer, -x, -y, 0);
paint_context = clutter_paint_context_new_for_framebuffer (framebuffer);
paint_context =
clutter_paint_context_new_for_framebuffer (framebuffer,
CLUTTER_PAINT_FLAG_NONE);
clutter_actor_paint (actor, paint_context);
clutter_paint_context_destroy (paint_context);