Remove a usage of GrPixelConfig in SkGpuBlurUtils::GaussianBlur
Bug: skia:6718
Change-Id: Ia8a96cf6907ffaafd989f1e5bb1443d1ef51b9e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242142
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index b77fe5b..0ef9383 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1204,6 +1204,7 @@
rect,
bitmap.getGenerationID(),
std::move(proxy),
+ SkColorTypeToGrColorType(bitmap.colorType()),
bitmap.refColorSpace(),
&this->surfaceProps());
}
@@ -1217,6 +1218,7 @@
SkIRect::MakeWH(image->width(), image->height()),
image->uniqueID(),
std::move(proxy),
+ SkColorTypeToGrColorType(image->colorType()),
image->refColorSpace(),
&this->surfaceProps());
} else if (image->peekPixels(&pm)) {
@@ -1262,10 +1264,13 @@
finalSubset = SkIRect::MakeSize(proxy->isize());
}
+ GrColorType ct = SkColorTypeToGrColorType(this->imageInfo().colorType());
+
return SkSpecialImage::MakeDeferredFromGpu(fContext.get(),
finalSubset,
kNeedNewImageUniqueID_SpecialImage,
std::move(proxy),
+ ct,
this->imageInfo().refColorSpace(),
&this->surfaceProps());
}
diff --git a/src/gpu/effects/GrRRectBlurEffect.fp b/src/gpu/effects/GrRRectBlurEffect.fp
index 6a39777..74ad750 100644
--- a/src/gpu/effects/GrRRectBlurEffect.fp
+++ b/src/gpu/effects/GrRRectBlurEffect.fp
@@ -76,6 +76,8 @@
auto rtc2 =
SkGpuBlurUtils::GaussianBlur(context,
std::move(srcProxy),
+ GrColorType::kAlpha_8,
+ kPremul_SkAlphaType,
SkIPoint::Make(0, 0),
nullptr,
SkIRect::MakeWH(size.fWidth, size.fHeight),
@@ -83,7 +85,6 @@
xformedSigma,
xformedSigma,
GrTextureDomain::kIgnore_Mode,
- kPremul_SkAlphaType,
SkBackingFit::kExact);
if (!rtc2) {
return nullptr;
diff --git a/src/gpu/effects/generated/GrRRectBlurEffect.h b/src/gpu/effects/generated/GrRRectBlurEffect.h
index aaff4d3..8b48489 100644
--- a/src/gpu/effects/generated/GrRRectBlurEffect.h
+++ b/src/gpu/effects/generated/GrRRectBlurEffect.h
@@ -75,6 +75,8 @@
}
auto rtc2 = SkGpuBlurUtils::GaussianBlur(context,
std::move(srcProxy),
+ GrColorType::kAlpha_8,
+ kPremul_SkAlphaType,
SkIPoint::Make(0, 0),
nullptr,
SkIRect::MakeWH(size.fWidth, size.fHeight),
@@ -82,7 +84,6 @@
xformedSigma,
xformedSigma,
GrTextureDomain::kIgnore_Mode,
- kPremul_SkAlphaType,
SkBackingFit::kExact);
if (!rtc2) {
return nullptr;