diff options
author | Brian Salomon <bsalomon@google.com> | 2017-07-18 20:45:21 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-18 20:45:35 +0000 |
commit | 0f01b2e8b5e3119e91886a2f7ec772a915d97a8c (patch) | |
tree | 2630a44a3f483cd1bb4333a65e1ebe7c005cb8c5 /src/core/SkPaintPriv.cpp | |
parent | 312f4b24f96ff8c3f2bdb040b8167c09765992e4 (diff) |
Revert "Revert "Improvements to GPU dither.""
This reverts commit 38fb308f3156aab1e42a61d77d08906a06263879.
Reason for revert: Reland with SkSL caps fix for vulkan
Original change's description:
> Revert "Improvements to GPU dither."
>
> This reverts commit 1806e33e6a09b1361de4925d32389a01e0e2c7e7.
>
> Reason for revert: <INSERT REASONING HERE>
>
> Original change's description:
> > Improvements to GPU dither.
> >
> > 1) Makes the range of the offset dependent on the config.
> >
> > 2) Uses an ordered dither on GPUs that support integers in shaders.
> >
> > 3) Enables dithering for all paints with dither flag when the color type of the dst is 4444
> >
> > 4) Dithers r,g,b and clamps to 0,a rather than dithering all four channels (same as CPU backend).
> >
> > Bug: skia:
> > Change-Id: Ie22c3adc38c6d1dbbcd97e4b7d16fc843e392c2e
> > Reviewed-on: https://skia-review.googlesource.com/23485
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com
>
> Change-Id: Ie82e88bd9032bf8eee745d32d9b57c335a8997c9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/24325
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Ic38ac276c8b88b8d993a29d1fcbfe37e84becd2a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/24282
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/core/SkPaintPriv.cpp')
-rw-r--r-- | src/core/SkPaintPriv.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkPaintPriv.cpp b/src/core/SkPaintPriv.cpp index dcd8dd6a5a..7d771f88a6 100644 --- a/src/core/SkPaintPriv.cpp +++ b/src/core/SkPaintPriv.cpp @@ -75,8 +75,8 @@ bool SkPaintPriv::ShouldDither(const SkPaint& p, SkColorType dstCT) { return false; } - // We always dither 565 when requested. - if (dstCT == SkColorType::kRGB_565_SkColorType) { + // We always dither 565 or 4444 when requested. + if (dstCT == kRGB_565_SkColorType || dstCT == kARGB_4444_SkColorType) { return true; } |