mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
aff34e8d1b
In a very particular situation, it could happen that our renderpass reordering did not work out. Consider this nesting of renderpasses (indentation indicates subpasses): pass A subpass of A pass B subpass of B Out reordering code would reorder this as: subpass of B subpass of A pass A pass B Which doesn't sound too bad, the subpasses happen before the passes after all. However, a subpass might be a pass that converts the image for a texture stored in the texture cache and then updates the cached image. If "subpass of A" is such a pass *and* if "subpass of B" then renders with exactly this texture, then "subpass of B" will use the result of "subpass of A" as a source. The fix is to ensure that subpasses stay ordered, too. The new order moves subpasses right before their parent pass, so the order of the example now looks like: subpass of A pass A subpass of B pass B The place where this would happen most common was when drawing thumbnail images in Nautilus, the GTK filechooser or Fractal. Those images are usually PNG files, which are straight alpha. They are then drawn with a drop shadow, which requires an offscreen for drawing as well as those images as premultipled sources, so lots of subpasses happen. If there is then a redraw with a somewhat tricky subregion, then the slicing of the region code could end up generating 2 passes that each draw half of the thumbnail image - the first pass drawing the top half and the second pass drawing the bottom half. And due to the bug the bottom half would then be drawn from the offscreen before the actual contents of the offscreen would be drawn, leading to a corrupt bottom part of the image. Test included. Fixes: #6318 |
||
---|---|---|
.. | ||
broadway | ||
gl | ||
gpu | ||
gen-gsk-gresources-xml.py | ||
gsk.h | ||
gskboundingboxprivate.h | ||
gskcairoblur.c | ||
gskcairoblurprivate.h | ||
gskcairorenderer.c | ||
gskcairorenderer.h | ||
gskcontour.c | ||
gskcontourprivate.h | ||
gskcurve-ct-values.c | ||
gskcurve.c | ||
gskcurveprivate.h | ||
gskdebug.c | ||
gskdebugprivate.h | ||
gskdiff.c | ||
gskdiffprivate.h | ||
gskenums.h | ||
gskenumtypes.c.template | ||
gskenumtypes.h.template | ||
gskglshader.c | ||
gskglshader.h | ||
gskglshaderprivate.h | ||
gskoffload.c | ||
gskoffloadprivate.h | ||
gskpath.c | ||
gskpath.h | ||
gskpathbuilder.c | ||
gskpathbuilder.h | ||
gskpathmeasure.c | ||
gskpathmeasure.h | ||
gskpathopprivate.h | ||
gskpathparser.c | ||
gskpathpoint.c | ||
gskpathpoint.h | ||
gskpathpointprivate.h | ||
gskpathprivate.h | ||
gskprivate.c | ||
gskprivate.h | ||
gskprofiler.c | ||
gskprofilerprivate.h | ||
gskrectprivate.h | ||
gskrenderer.c | ||
gskrenderer.h | ||
gskrendererprivate.h | ||
gskrendernode.c | ||
gskrendernode.h | ||
gskrendernodeimpl.c | ||
gskrendernodeparser.c | ||
gskrendernodeparserprivate.h | ||
gskrendernodeprivate.h | ||
gskroundedrect.c | ||
gskroundedrect.h | ||
gskroundedrectprivate.h | ||
gskstroke.c | ||
gskstroke.h | ||
gskstrokeprivate.h | ||
gsktransform.c | ||
gsktransform.h | ||
gsktransformprivate.h | ||
gsktypes.h | ||
meson.build |