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

Unified Diff: src/gpu/GrBlurUtils.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/gpu/GrBlurUtils.cpp
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index 65b18a5edcf7f50f1232e2bcb51cfc2bda54845a..b89f2bd8f3a2f3e52ef7564acfb85c38144115ef 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -132,6 +132,7 @@ static GrTexture* create_mask_GPU(GrContext* context,
drawContext->clear(nullptr, 0x0, true);
GrPaint tempPaint;
+ // SRGBTODO: AllowSRGBInputs?
bsalomon 2016/04/05 13:24:01 This is creating a mask, shouldn't have to worry a
Brian Osman 2016/04/05 15:36:41 Acknowledged.
tempPaint.setAntiAlias(doAA);
tempPaint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op);
@@ -228,7 +229,8 @@ static void draw_path_with_mask_filter(GrContext* context,
if (mask) {
GrTexture* filtered;
- if (maskFilter->filterMaskGPU(mask, viewMatrix, maskRect, &filtered, true)) {
+ if (maskFilter->filterMaskGPU(mask, viewMatrix, maskRect, &filtered, true,
+ paint->getAllowSRGBInputs())) {
// filterMaskGPU gives us ownership of a ref to the result
SkAutoTUnref<GrTexture> atu(filtered);
if (draw_mask(drawContext, clip, viewMatrix, maskRect, paint, filtered)) {
@@ -335,7 +337,9 @@ void GrBlurUtils::drawPathWithMaskFilter(GrContext* context,
}
GrPaint grPaint;
- if (!SkPaintToGrPaint(context, paint, viewMatrix, &grPaint)) {
+ // SRGBTODO: AllowSRGBInputs? (Usually correct, because drawContext came from device?)
+ if (!SkPaintToGrPaint(context, paint, viewMatrix, drawContext->allowSRGBInputs(),
bsalomon 2016/04/05 13:24:01 I think this is right.
Brian Osman 2016/04/05 15:36:41 Acknowledged.
+ &grPaint)) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698