clutter/paint-node: Have caller of .._get_framebuffer() handle fallback

clutter_paint_node_get_framebuffer() fell back on
cogl_get_draw_framebuffer() when the root node didn't have a custom
get_framebuffer vfunc. As this relies on deprecated implicit Cogl stack
API, it needs to go away, so handle this in the caller that knows more
about the context.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
This commit is contained in:
Jonas Ådahl
2019-11-22 10:19:09 +01:00
committed by Georges Basile Stavracas Neto
parent 48e6fccc95
commit f11170fecb
3 changed files with 25 additions and 8 deletions

View File

@ -525,6 +525,7 @@ do_paint_content (MetaShapedTexture *stex,
cairo_region_t *blended_tex_region;
CoglContext *ctx;
CoglPipelineFilter filter;
CoglFramebuffer *framebuffer;
ensure_size_valid (stex);
@ -547,7 +548,10 @@ do_paint_content (MetaShapedTexture *stex,
filter = COGL_PIPELINE_FILTER_LINEAR;
if (meta_actor_painting_untransformed (clutter_paint_node_get_framebuffer (root_node),
framebuffer = clutter_paint_node_get_framebuffer (root_node);
if (!framebuffer)
framebuffer = cogl_get_draw_framebuffer ();
if (meta_actor_painting_untransformed (framebuffer,
dst_width, dst_height,
NULL, NULL))
filter = COGL_PIPELINE_FILTER_NEAREST;