Skip to content

compositor/multi-texture-format: Cache snippets

Daniel van Vugt requested to merge vanvugt/mutter:cache-multi-snippets into main

These snippets are retrieved anew every time a window is resized. But callers never modify them, they're effectively read-only so cache them at the place of creation.

This is required to convince the pipeline hash that each reuse of the same snippet really is the same snippet and so the pipeline is unchanged. CoglPipelineSnippetList only does shallow comparisons and there's no need right now to reimplement it as a deep comparison.

This eliminates the log message:

Over 50 separate %s have been generated which is very unusual, so something is probably wrong!

which isn't actually a leak but more a warning about wasting time.

Closes: gnome-shell#6958 (closed)

Edited by Daniel van Vugt

Merge request reports