Don't allocate invalidation messages for generators that make uncacheable textures
Fixes a memory leak in Flutter.
Change-Id: Ia86ea8d4d78539dc28acb207e834861f274c0a5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260538
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/GrBackendTextureImageGenerator.h b/src/gpu/GrBackendTextureImageGenerator.h
index 887ff21..d9980c5 100644
--- a/src/gpu/GrBackendTextureImageGenerator.h
+++ b/src/gpu/GrBackendTextureImageGenerator.h
@@ -42,6 +42,7 @@
TexGenType onCanGenerateTexture() const override { return TexGenType::kCheap; }
sk_sp<GrTextureProxy> onGenerateTexture(GrRecordingContext*, const SkImageInfo&,
const SkIPoint&, bool willNeedMipMaps) override;
+ bool onTexturesAreCacheable() const override { return false; }
private:
GrBackendTextureImageGenerator(const SkImageInfo& info, GrTexture*, GrSurfaceOrigin,