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
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index bb0ef91..2694718 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -655,7 +655,7 @@
}
#ifndef SK_IGNORE_GPU_DITHER
- if (skPaint.isDither() && grPaint->numColorFragmentProcessors() > 0) {
+ if (skPaint.isDither() && grPaint->numColorFragmentProcessors() > 0 && !allowSRGBInputs) {
grPaint->addColorFragmentProcessor(GrDitherEffect::Make());
}
#endif