Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: gm/lcdtext.cpp

Issue 1834673002: Don't force lcd on non-opaque portion of layer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/lcdtext.cpp
diff --git a/gm/lcdtext.cpp b/gm/lcdtext.cpp
index e40fb0df18234d06baf2f63731b197bdb6e0f436..a2bfa01d3827ccac3f66a267042c523a1984de45 100644
--- a/gm/lcdtext.cpp
+++ b/gm/lcdtext.cpp
@@ -145,7 +145,13 @@ DEF_SIMPLE_GM(savelayer_lcdtext, canvas, 620, 260) {
for (auto preserve : gPreserveLCDText) {
preserve ? canvas->saveLayerPreserveLCDTextRequests(nullptr, nullptr)
: canvas->saveLayer(nullptr, nullptr);
- canvas->drawText("Hamburgefons", 12, 30, 60, paint);
+ if (preserve) {
+ SkPaint noLCD = paint;
+ noLCD.setLCDRenderText(false);
+ canvas->drawText("LCD not supported", 17, 30, 60, noLCD);
+ } else {
+ canvas->drawText("Hamburgefons", 12, 30, 60, paint);
+ }
SkPaint p;
p.setColor(0xFFCCCCCC);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698