OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "Benchmark.h" | 9 #include "Benchmark.h" |
10 #include "Resources.h" | 10 #include "Resources.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 fName.appendf("_%02X", fPaint.getAlpha()); | 104 fName.appendf("_%02X", fPaint.getAlpha()); |
105 } | 105 } |
106 | 106 |
107 if (fDoColorEmoji) { | 107 if (fDoColorEmoji) { |
108 fName.append("_ColorEmoji"); | 108 fName.append("_ColorEmoji"); |
109 } | 109 } |
110 | 110 |
111 return fName.c_str(); | 111 return fName.c_str(); |
112 } | 112 } |
113 | 113 |
114 void onDraw(const int loops, SkCanvas* canvas) override { | 114 void onDraw(int loops, SkCanvas* canvas) override { |
115 const SkIPoint dim = this->getSize(); | 115 const SkIPoint dim = this->getSize(); |
116 SkRandom rand; | 116 SkRandom rand; |
117 | 117 |
118 SkPaint paint(fPaint); | 118 SkPaint paint(fPaint); |
119 this->setupPaint(&paint); | 119 this->setupPaint(&paint); |
120 // explicitly need these | 120 // explicitly need these |
121 paint.setColor(fPaint.getColor()); | 121 paint.setColor(fPaint.getColor()); |
122 paint.setAntiAlias(kBW != fFQ); | 122 paint.setAntiAlias(kBW != fFQ); |
123 paint.setLCDRenderText(kLCD == fFQ); | 123 paint.setLCDRenderText(kLCD == fFQ); |
124 | 124 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 DEF_BENCH( return new TextBench(STR, 16, 0xFFFF0000, kLCD); ) | 169 DEF_BENCH( return new TextBench(STR, 16, 0xFFFF0000, kLCD); ) |
170 DEF_BENCH( return new TextBench(STR, 16, 0x88FF0000, kLCD); ) | 170 DEF_BENCH( return new TextBench(STR, 16, 0x88FF0000, kLCD); ) |
171 | 171 |
172 DEF_BENCH( return new TextBench(STR, 16, 0xFFFFFFFF, kBW, true); ) | 172 DEF_BENCH( return new TextBench(STR, 16, 0xFFFFFFFF, kBW, true); ) |
173 DEF_BENCH( return new TextBench(STR, 16, 0xFF000000, kBW, true); ) | 173 DEF_BENCH( return new TextBench(STR, 16, 0xFF000000, kBW, true); ) |
174 DEF_BENCH( return new TextBench(STR, 16, 0xFFFF0000, kBW, true); ) | 174 DEF_BENCH( return new TextBench(STR, 16, 0xFFFF0000, kBW, true); ) |
175 DEF_BENCH( return new TextBench(STR, 16, 0x88FF0000, kBW, true); ) | 175 DEF_BENCH( return new TextBench(STR, 16, 0x88FF0000, kBW, true); ) |
176 | 176 |
177 DEF_BENCH( return new TextBench(STR, 16, 0xFF000000, kBW, true, true); ) | 177 DEF_BENCH( return new TextBench(STR, 16, 0xFF000000, kBW, true, true); ) |
178 DEF_BENCH( return new TextBench(STR, 16, 0xFF000000, kAA, false, true); ) | 178 DEF_BENCH( return new TextBench(STR, 16, 0xFF000000, kAA, false, true); ) |
OLD | NEW |