Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: src/effects/SkBlurMaskFilter.cpp

Issue 1845283003: Gamma-correctness pushed into Skia, top-down. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove helper function for old pixel-config method of enabling decode Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/effects/SkBlurMaskFilter.cpp
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index bb6a8a5ae64452a843ab325f41359a4a307e6860..8909fc0b61ead3c8727868157fa10ea71c4b3d94 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -68,7 +68,8 @@ public:
const SkMatrix& ctm,
const SkRect& maskRect,
GrTexture** result,
- bool canOverwriteSrc) const override;
+ bool canOverwriteSrc,
+ bool allowSRGBInputs) const override;
#endif
void computeFastBounds(const SkRect&, SkRect*) const override;
@@ -1231,7 +1232,8 @@ bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
const SkMatrix& ctm,
const SkRect& maskRect,
GrTexture** result,
- bool canOverwriteSrc) const {
+ bool canOverwriteSrc,
+ bool allowSRGBInputs) const {
SkRect clipRect = SkRect::MakeWH(maskRect.width(), maskRect.height());
GrContext* context = src->getContext();
@@ -1243,13 +1245,15 @@ bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
// gaussianBlur. Otherwise, we need to save it for later compositing.
bool isNormalBlur = (kNormal_SkBlurStyle == fBlurStyle);
*result = SkGpuBlurUtils::GaussianBlur(context, src, isNormalBlur && canOverwriteSrc,
- clipRect, nullptr, xformedSigma, xformedSigma);
+ allowSRGBInputs, clipRect, nullptr,
bsalomon 2016/04/05 13:24:01 AFAIK, this is taking an input mask and produced a
Brian Osman 2016/04/05 15:36:41 Acknowledged.
+ xformedSigma, xformedSigma);
if (nullptr == *result) {
return false;
}
if (!isNormalBlur) {
GrPaint paint;
+ // SRGBTODO: AllowSRGBInputs?
bsalomon 2016/04/05 13:24:01 No, this is taking the blurred mask and the origin
Brian Osman 2016/04/05 15:36:41 Acknowledged.
SkMatrix matrix;
matrix.setIDiv(src->width(), src->height());
// Blend pathTexture over blurTexture.

Powered by Google App Engine
This is Rietveld 408576698