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

Unified Diff: bench/TextBench.cpp

Issue 1319503003: Add white variants to TextBench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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: bench/TextBench.cpp
diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp
index 2d051c93edf4387674f95e2edcea41f4db89ee16..3d97428d9fd51e03c3eda45548ac5e7df86fc9ee 100644
--- a/bench/TextBench.cpp
+++ b/bench/TextBench.cpp
@@ -96,10 +96,12 @@ protected:
fName.append("_pos");
}
fName.appendf("_%s", fontQualityName(fPaint));
- if (SK_ColorBLACK != fPaint.getColor()) {
- fName.appendf("_%02X", fPaint.getAlpha());
- } else {
+ if (SK_ColorBLACK == fPaint.getColor()) {
fName.append("_BK");
+ } else if (SK_ColorWHITE == fPaint.getColor()) {
+ fName.append("_WT");
+ } else {
+ fName.appendf("_%02X", fPaint.getAlpha());
}
if (fDoColorEmoji) {
@@ -152,18 +154,22 @@ private:
#define STR "Hamburgefons"
+DEF_BENCH( return new TextBench(STR, 16, 0xFFFFFFFF, kBW); )
DEF_BENCH( return new TextBench(STR, 16, 0xFF000000, kBW); )
DEF_BENCH( return new TextBench(STR, 16, 0xFFFF0000, kBW); )
DEF_BENCH( return new TextBench(STR, 16, 0x88FF0000, kBW); )
+DEF_BENCH( return new TextBench(STR, 16, 0xFFFFFFFF, kAA); )
DEF_BENCH( return new TextBench(STR, 16, 0xFF000000, kAA); )
DEF_BENCH( return new TextBench(STR, 16, 0xFFFF0000, kAA); )
DEF_BENCH( return new TextBench(STR, 16, 0x88FF0000, kAA); )
+DEF_BENCH( return new TextBench(STR, 16, 0xFFFFFFFF, kLCD); )
DEF_BENCH( return new TextBench(STR, 16, 0xFF000000, kLCD); )
DEF_BENCH( return new TextBench(STR, 16, 0xFFFF0000, kLCD); )
DEF_BENCH( return new TextBench(STR, 16, 0x88FF0000, kLCD); )
+DEF_BENCH( return new TextBench(STR, 16, 0xFFFFFFFF, kBW, true); )
DEF_BENCH( return new TextBench(STR, 16, 0xFF000000, kBW, true); )
DEF_BENCH( return new TextBench(STR, 16, 0xFFFF0000, kBW, true); )
DEF_BENCH( return new TextBench(STR, 16, 0x88FF0000, kBW, true); )
« 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