diff options
author | Brian Osman <brianosman@google.com> | 2017-05-23 17:09:19 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-23 21:35:18 +0000 |
commit | 0610a462ad2e17057849784cdab73d634bab5fb9 (patch) | |
tree | 3729aa69da3ecfddaeccf049198b3c06fe77f692 | |
parent | 355feabac2298bad97c9e42570b52216b2cdf63f (diff) |
Legacy raster still doesn't handle transparent LCD
Bug: skia:6655
Change-Id: I1431fb5bcf955dd32c15dad9d24a6a7a7aa626f0
Reviewed-on: https://skia-review.googlesource.com/17788
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
-rw-r--r-- | gm/lcdtext.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gm/lcdtext.cpp b/gm/lcdtext.cpp index a48856f603..1b377ba818 100644 --- a/gm/lcdtext.cpp +++ b/gm/lcdtext.cpp @@ -146,8 +146,13 @@ DEF_SIMPLE_GM(savelayer_lcdtext, canvas, 620, 260) { for (auto preserve : gPreserveLCDText) { preserve ? canvas->saveLayerPreserveLCDTextRequests(nullptr, nullptr) : canvas->saveLayer(nullptr, nullptr); - - canvas->drawString("Hamburgefons", 30, 60, paint); + if (preserve && !canvas->imageInfo().colorSpace()) { + SkPaint noLCD = paint; + noLCD.setLCDRenderText(false); + canvas->drawString("LCD not supported", 30, 60, noLCD); + } else { + canvas->drawString("Hamburgefons", 30, 60, paint); + } SkPaint p; p.setColor(0xFFCCCCCC); |