mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
37bea9d162
When a cache item is invalid, don't move it into the hash table. Instead, just delete it. Something like this could happen: 1. A texture is cached In the case of #6867 this would be a webpage in epiphany. 2. The texture cache item is garbage-collected For example, epiphany might switch to a new tab, and the previous page's texture will remain. After 15s or so, we collect our item for that texture. 3. The texture is cached again, but in the target colorspace We now decide we need the texture again, but not in any colorspace, we need it in the target colorspace. This might be because we run an effect on it (like a crossfade) or because we want mipmaps (like in the overview map, where its zoomed out). 4. The old invalid item is transitioned into the hash table We now have an invalid item in the hash table. This is extra bad, because it had only one reference (from the texture), but we treat it like it has 2 (from us in the hash table and from the texture). So depending on if the texture is freed before we reuse it, we get different results: If it was free, we get invalid memory accesses, if it was not freed, we treat it like a valid cache item and think the image inside is still valid. Fixes #6867 |
||
---|---|---|
.. | ||
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 |