aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-07-03 10:40:57 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-03 15:28:54 +0000
commit34ec37458b0a6e157912e0ff6ee8e136885474b9 (patch)
tree4effe9b5fd3f56fde4129b808a3c9eb21958c87d /src/gpu/effects
parent630741c7c0ea8e504b04afd2f758232fb5c839a4 (diff)
Replace isGammaCorrect with isLinearlyBlended
We were using isGammaCorrect (presence of a color space) to trigger rendering effects that should only apply when doing linear blending. Rename and redefine that function to fix many of those issues. In a few places, we really do care about the color space. The big win here is text rendering, which is now the same on legacy gl and glsrgb configs. Also left some comments about our desire to do something smarter for text in the future. Bug: skia: Change-Id: I94106e95f5f81aaa0a28dbaccd65f5d94cf0de67 Reviewed-on: https://skia-review.googlesource.com/139109 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrDitherEffect.fp4
-rw-r--r--src/gpu/effects/GrDitherEffect.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/effects/GrDitherEffect.fp b/src/gpu/effects/GrDitherEffect.fp
index c51865e38b..ed6c0e6b70 100644
--- a/src/gpu/effects/GrDitherEffect.fp
+++ b/src/gpu/effects/GrDitherEffect.fp
@@ -18,8 +18,6 @@ layout(key) in int rangeType;
case kRGBA_8888_GrPixelConfig:
case kRGB_888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
- case kSRGBA_8888_GrPixelConfig:
- case kSBGRA_8888_GrPixelConfig:
rangeType = 0;
break;
case kRGB_565_GrPixelConfig:
@@ -29,6 +27,8 @@ layout(key) in int rangeType;
rangeType = 2;
break;
case kUnknown_GrPixelConfig:
+ case kSRGBA_8888_GrPixelConfig:
+ case kSBGRA_8888_GrPixelConfig:
case kRGBA_1010102_GrPixelConfig:
case kAlpha_half_GrPixelConfig:
case kAlpha_half_as_Red_GrPixelConfig:
diff --git a/src/gpu/effects/GrDitherEffect.h b/src/gpu/effects/GrDitherEffect.h
index 9355a5907c..70adc45e6a 100644
--- a/src/gpu/effects/GrDitherEffect.h
+++ b/src/gpu/effects/GrDitherEffect.h
@@ -26,8 +26,6 @@ public:
case kRGBA_8888_GrPixelConfig:
case kRGB_888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
- case kSRGBA_8888_GrPixelConfig:
- case kSBGRA_8888_GrPixelConfig:
rangeType = 0;
break;
case kRGB_565_GrPixelConfig:
@@ -37,6 +35,8 @@ public:
rangeType = 2;
break;
case kUnknown_GrPixelConfig:
+ case kSRGBA_8888_GrPixelConfig:
+ case kSBGRA_8888_GrPixelConfig:
case kRGBA_1010102_GrPixelConfig:
case kAlpha_half_GrPixelConfig:
case kAlpha_half_as_Red_GrPixelConfig: