aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-07-13 09:05:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-13 09:05:47 -0700
commit0e1161d03f40fc1638481222b06fb74f6a9c734a (patch)
treeb7900823a6d4290c97a93f1c145df52027ede0fa /src
parent6e998e6137e6b25f047b5c5943f2b02485165e3e (diff)
Never allow dither for non-legacy (sRGB or F16) targets.
With sRGB, the noise from dithering is (obviously) non-linear, and highly objectionable for very dark values. With F16, it's completely unnecessary. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2113793002 Review-Url: https://codereview.chromium.org/2113793002
Diffstat (limited to 'src')
-rw-r--r--src/gpu/SkGr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index bb0ef91a88..26947182f8 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -655,7 +655,7 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context,
}
#ifndef SK_IGNORE_GPU_DITHER
- if (skPaint.isDither() && grPaint->numColorFragmentProcessors() > 0) {
+ if (skPaint.isDither() && grPaint->numColorFragmentProcessors() > 0 && !allowSRGBInputs) {
grPaint->addColorFragmentProcessor(GrDitherEffect::Make());
}
#endif