Don't use color type derived from GrPixelConfig to determine proxy texture swizzle.
Change-Id: Ib19e378d7dd8243cbbee68e97bcb3b6159943500
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233898
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrBitmapTextureMaker.cpp b/src/gpu/GrBitmapTextureMaker.cpp
index 016b907..48ff321 100644
--- a/src/gpu/GrBitmapTextureMaker.cpp
+++ b/src/gpu/GrBitmapTextureMaker.cpp
@@ -44,7 +44,9 @@
sk_sp<GrTextureProxy> proxy;
if (fOriginalKey.isValid()) {
- proxy = proxyProvider->findOrCreateProxyByUniqueKey(fOriginalKey, kTopLeft_GrSurfaceOrigin);
+ auto colorType = SkColorTypeToGrColorType(fBitmap.colorType());
+ proxy = proxyProvider->findOrCreateProxyByUniqueKey(fOriginalKey, colorType,
+ kTopLeft_GrSurfaceOrigin);
if (proxy && (!willBeMipped || GrMipMapped::kYes == proxy->mipMapped())) {
return proxy;
}