From f1d41db0064dda9e43ab948c8161dfa04c95f3ac Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 10 Feb 2021 11:12:06 +0100 Subject: [PATCH] Clarify comment in draw_image_impl --- sixtyfps_runtime/rendering_backends/gl/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sixtyfps_runtime/rendering_backends/gl/lib.rs b/sixtyfps_runtime/rendering_backends/gl/lib.rs index ebf6b3471..db3822c10 100644 --- a/sixtyfps_runtime/rendering_backends/gl/lib.rs +++ b/sixtyfps_runtime/rendering_backends/gl/lib.rs @@ -1324,8 +1324,9 @@ impl GLItemRenderer { } }; - // It's possible that our cached image went from no colorization to some brush, in which case we have to - // invalidate the cache and try again. + // It's possible that our item cache contains an image but it's not colorized yet because it was only + // placed there via the `image_size` function (which doesn't colorize). So we may have to invalidate our + // item cache and try again. if colorize_property.map_or(false, |prop| !matches!(prop.get(), Brush::NoBrush)) && !cached_image.is_colorized_image() {