Support domain clamping and transform matrices in YUVToRGB effects
This helps avoid flattening of YUV/A images when drawn with a strict src
rect constraint. SkiaRenderer almost always provides a strict constraint
for their YUV videos.
This adds a GM that replicates the issue in skbug:8959, and adds a GM to
the wacky_yuv set that checks domain clamping across all of the different
formats.
Bug: 8959
Change-Id: I53f531a94f3b63f81d8c3cbe22d868e3356aeabd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207020
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrImageTextureMaker.h b/src/gpu/GrImageTextureMaker.h
index ba7772b..4fa5e9b 100644
--- a/src/gpu/GrImageTextureMaker.h
+++ b/src/gpu/GrImageTextureMaker.h
@@ -47,6 +47,9 @@
public:
GrYUVAImageTextureMaker(GrContext* context, const SkImage* client, bool useDecal = false);
+ // This could be made more nuanced and compare all of the texture proxy resolutions, but
+ // it's probably not worth the effort.
+ bool hasMixedResolutions() const override { return true; }
protected:
// TODO: consider overriding this, for the case where the underlying generator might be
// able to efficiently produce a "stretched" texture natively (e.g. picture-backed)