diff options
author | Mike Reed <reed@google.com> | 2020-02-13 10:21:54 -0500 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2020-02-14 17:50:18 -0500 |
commit | 331c4e1207a28c6bbd9a8def5c22a892f25fe2f4 (patch) | |
tree | 4d29ff6397dea98fbc33e0a646fd463d33401a11 /libs/hwui | |
parent | 12a75f325a9866fcedeab201cfc8ce9e293bbc0c (diff) |
Use updated factory for SkOverdrawColorFilter
Test: make
Change-Id: Ibf67a37e90152326b3088d2f15f17a6ad261658c
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/pipeline/skia/SkiaPipeline.cpp | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp index 29b4dd7f32e7..06584027863a 100644 --- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp @@ -600,27 +600,24 @@ void SkiaPipeline::setSurfaceColorProperties(ColorMode colorMode) { // Overdraw debugging // These colors should be kept in sync with Caches::getOverdrawColor() with a few differences. -// This implementation: -// (1) Requires transparent entries for "no overdraw" and "single draws". -// (2) Requires premul colors (instead of unpremul). -// (3) Requires RGBA colors (instead of BGRA). -static const uint32_t kOverdrawColors[2][6] = { - { - 0x00000000, - 0x00000000, - 0x2f2f0000, - 0x2f002f00, - 0x3f00003f, - 0x7f00007f, - }, - { - 0x00000000, - 0x00000000, - 0x2f2f0000, - 0x4f004f4f, - 0x5f50335f, - 0x7f00007f, - }, +// This implementation requires transparent entries for "no overdraw" and "single draws". +static const SkColor kOverdrawColors[2][6] = { + { + 0x00000000, + 0x00000000, + 0x2f0000ff, + 0x2f00ff00, + 0x3fff0000, + 0x7fff0000, + }, + { + 0x00000000, + 0x00000000, + 0x2f0000ff, + 0x4fffff00, + 0x5fff89d7, + 0x7fff0000, + }, }; void SkiaPipeline::renderOverdraw(const SkRect& clip, @@ -642,8 +639,8 @@ void SkiaPipeline::renderOverdraw(const SkRect& clip, // Draw overdraw colors to the canvas. The color filter will convert counts to colors. SkPaint paint; - const SkPMColor* colors = kOverdrawColors[static_cast<int>(Properties::overdrawColorSet)]; - paint.setColorFilter(SkOverdrawColorFilter::Make(colors)); + const SkColor* colors = kOverdrawColors[static_cast<int>(Properties::overdrawColorSet)]; + paint.setColorFilter(SkOverdrawColorFilter::MakeWithSkColors(colors)); surface->getCanvas()->drawImage(counts.get(), 0.0f, 0.0f, &paint); } |