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/effects/GrCircleBlurFragmentProcessor.fp b/src/gpu/effects/GrCircleBlurFragmentProcessor.fp
index c969249..9fe9295 100644
--- a/src/gpu/effects/GrCircleBlurFragmentProcessor.fp
+++ b/src/gpu/effects/GrCircleBlurFragmentProcessor.fp
@@ -226,8 +226,8 @@
builder[0] = sigmaToCircleRRatioFixed;
builder.finish();
- sk_sp<GrTextureProxy> blurProfile =
- proxyProvider->findOrCreateProxyByUniqueKey(key, kTopLeft_GrSurfaceOrigin);
+ sk_sp<GrTextureProxy> blurProfile = proxyProvider->findOrCreateProxyByUniqueKey(
+ key, GrColorType::kAlpha_8, kTopLeft_GrSurfaceOrigin);
if (!blurProfile) {
static constexpr int kProfileTextureWidth = 512;
diff --git a/src/gpu/effects/GrRRectBlurEffect.fp b/src/gpu/effects/GrRRectBlurEffect.fp
index 1ecc95d..cf23511 100644
--- a/src/gpu/effects/GrRRectBlurEffect.fp
+++ b/src/gpu/effects/GrRRectBlurEffect.fp
@@ -51,7 +51,7 @@
GrProxyProvider* proxyProvider = context->priv().proxyProvider();
sk_sp<GrTextureProxy> mask(proxyProvider->findOrCreateProxyByUniqueKey(
- key, kBottomLeft_GrSurfaceOrigin));
+ key, GrColorType::kAlpha_8, kBottomLeft_GrSurfaceOrigin));
if (!mask) {
// TODO: this could be approx but the texture coords will need to be updated
sk_sp<GrRenderTargetContext> rtc(
diff --git a/src/gpu/effects/GrRectBlurEffect.fp b/src/gpu/effects/GrRectBlurEffect.fp
index 0eb4bdb..12e3614 100644
--- a/src/gpu/effects/GrRectBlurEffect.fp
+++ b/src/gpu/effects/GrRectBlurEffect.fp
@@ -52,7 +52,7 @@
builder.finish();
sk_sp<GrTextureProxy> blurProfile(proxyProvider->findOrCreateProxyByUniqueKey(
- key, kTopLeft_GrSurfaceOrigin));
+ key, GrColorType::kAlpha_8, kTopLeft_GrSurfaceOrigin));
if (!blurProfile) {
SkImageInfo ii = SkImageInfo::MakeA8(profileSize, 1);
diff --git a/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.cpp b/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.cpp
index 8211f61..9445a5a 100644
--- a/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.cpp
+++ b/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.cpp
@@ -203,8 +203,8 @@
builder[0] = sigmaToCircleRRatioFixed;
builder.finish();
- sk_sp<GrTextureProxy> blurProfile =
- proxyProvider->findOrCreateProxyByUniqueKey(key, kTopLeft_GrSurfaceOrigin);
+ sk_sp<GrTextureProxy> blurProfile = proxyProvider->findOrCreateProxyByUniqueKey(
+ key, GrColorType::kAlpha_8, kTopLeft_GrSurfaceOrigin);
if (!blurProfile) {
static constexpr int kProfileTextureWidth = 512;
diff --git a/src/gpu/effects/generated/GrRRectBlurEffect.h b/src/gpu/effects/generated/GrRRectBlurEffect.h
index aa00554..ffec0a3 100644
--- a/src/gpu/effects/generated/GrRRectBlurEffect.h
+++ b/src/gpu/effects/generated/GrRRectBlurEffect.h
@@ -51,8 +51,8 @@
GrProxyProvider* proxyProvider = context->priv().proxyProvider();
- sk_sp<GrTextureProxy> mask(
- proxyProvider->findOrCreateProxyByUniqueKey(key, kBottomLeft_GrSurfaceOrigin));
+ sk_sp<GrTextureProxy> mask(proxyProvider->findOrCreateProxyByUniqueKey(
+ key, GrColorType::kAlpha_8, kBottomLeft_GrSurfaceOrigin));
if (!mask) {
// TODO: this could be approx but the texture coords will need to be updated
sk_sp<GrRenderTargetContext> rtc(
diff --git a/src/gpu/effects/generated/GrRectBlurEffect.h b/src/gpu/effects/generated/GrRectBlurEffect.h
index eee6b71..361aa26 100644
--- a/src/gpu/effects/generated/GrRectBlurEffect.h
+++ b/src/gpu/effects/generated/GrRectBlurEffect.h
@@ -31,8 +31,8 @@
builder[0] = profileSize;
builder.finish();
- sk_sp<GrTextureProxy> blurProfile(
- proxyProvider->findOrCreateProxyByUniqueKey(key, kTopLeft_GrSurfaceOrigin));
+ sk_sp<GrTextureProxy> blurProfile(proxyProvider->findOrCreateProxyByUniqueKey(
+ key, GrColorType::kAlpha_8, kTopLeft_GrSurfaceOrigin));
if (!blurProfile) {
SkImageInfo ii = SkImageInfo::MakeA8(profileSize, 1);