Remove texture swizzle from GrSurfaceProxy.
Bug: skia:9556
Change-Id: I2c450c51e1a0987aacebdfcf32ef76cd31f0e80b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279656
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrAHardwareBufferImageGenerator.cpp b/src/gpu/GrAHardwareBufferImageGenerator.cpp
index 4062e8f..77c406e 100644
--- a/src/gpu/GrAHardwareBufferImageGenerator.cpp
+++ b/src/gpu/GrAHardwareBufferImageGenerator.cpp
@@ -139,8 +139,6 @@
AHardwareBuffer* fAhb;
};
- GrSwizzle readSwizzle = context->priv().caps()->getReadSwizzle(backendFormat, grColorType);
-
sk_sp<GrTextureProxy> texProxy = proxyProvider->createLazyProxy(
[direct, buffer = AutoAHBRelease(hardwareBuffer), width, height, isProtectedContent,
backendFormat, grColorType](
@@ -180,10 +178,12 @@
return tex;
},
- backendFormat, {width, height}, readSwizzle, GrRenderable::kNo, 1, GrMipMapped::kNo,
+ backendFormat, {width, height}, GrRenderable::kNo, 1, GrMipMapped::kNo,
GrMipMapsStatus::kNotAllocated, GrInternalSurfaceFlags::kReadOnly, SkBackingFit::kExact,
SkBudgeted::kNo, GrProtected::kNo, GrSurfaceProxy::UseAllocator::kYes);
+ GrSwizzle readSwizzle = context->priv().caps()->getReadSwizzle(backendFormat, grColorType);
+
return GrSurfaceProxyView(std::move(texProxy), fSurfaceOrigin, readSwizzle);
}