Release YUVA planes in SkImage_GpuYUVA after flattenning to RGBA.
Also removed unused virtual function from SkImage_GpuBase and override
on SkImage_GpuYUVA.
Change-Id: Ib47b46b529b16976181cb9453976133d66e0f952
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212734
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrImageTextureMaker.cpp b/src/gpu/GrImageTextureMaker.cpp
index 80b39d0..0fb1cbe 100644
--- a/src/gpu/GrImageTextureMaker.cpp
+++ b/src/gpu/GrImageTextureMaker.cpp
@@ -91,8 +91,9 @@
bool coordsLimitedToConstraintRect,
const GrSamplerState::Filter* filterOrNullForBicubic) {
- // Check simple cases to see if we need to fall back to flattening the image
- if (!filterOrNullForBicubic || this->domainNeedsDecal()) {
+ // Check simple cases to see if we need to fall back to flattening the image (or whether it's
+ // already been flattened.)
+ if (!filterOrNullForBicubic || this->domainNeedsDecal() || fImage->fRGBProxy) {
return this->INHERITED::createFragmentProcessor(textureMatrix, constraintRect,
filterConstraint,
coordsLimitedToConstraintRect,