aboutsummaryrefslogtreecommitdiffstats
path: root/bench
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2009-10-20 09:39:47 -0400
committerMike Reed <reed@google.com>2009-10-20 09:54:16 -0400
commit6f1797f739a9b2741923a168eba55edda880321e (patch)
tree2682b0f0c8e2b06bb67e6a95f604b8b326100f39 /bench
parentec0476251b3f9cbd0124481f619f63cf313dbe98 (diff)
downloadexternal_skia-6f1797f739a9b2741923a168eba55edda880321e.zip
external_skia-6f1797f739a9b2741923a168eba55edda880321e.tar.gz
external_skia-6f1797f739a9b2741923a168eba55edda880321e.tar.bz2
motorola neon patch for blitMask, used by text drawing.
Diffstat (limited to 'bench')
-rw-r--r--bench/TextBench.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp
index 93ef1c5..5caaddb 100644
--- a/bench/TextBench.cpp
+++ b/bench/TextBench.cpp
@@ -73,17 +73,21 @@ protected:
const SkScalar x0 = SkIntToScalar(-10);
const SkScalar y0 = SkIntToScalar(-10);
+ const SkColor colors[] = { SK_ColorBLACK, SK_ColorGRAY };
- for (int i = 0; i < N; i++) {
- SkScalar x = x0 + rand.nextUScalar1() * dim.fX;
- SkScalar y = y0 + rand.nextUScalar1() * dim.fY;
- if (fPos) {
- canvas->save(SkCanvas::kMatrix_SaveFlag);
- canvas->translate(x, y);
- canvas->drawPosText(fText.c_str(), fText.size(), fPos, paint);
- canvas->restore();
- } else {
- canvas->drawText(fText.c_str(), fText.size(), x, y, paint);
+ for (size_t j = 0; j < SK_ARRAY_COUNT(colors); j++) {
+ paint.setColor(colors[j]);
+ for (int i = 0; i < N; i++) {
+ SkScalar x = x0 + rand.nextUScalar1() * dim.fX;
+ SkScalar y = y0 + rand.nextUScalar1() * dim.fY;
+ if (fPos) {
+ canvas->save(SkCanvas::kMatrix_SaveFlag);
+ canvas->translate(x, y);
+ canvas->drawPosText(fText.c_str(), fText.size(), fPos, paint);
+ canvas->restore();
+ } else {
+ canvas->drawText(fText.c_str(), fText.size(), x, y, paint);
+ }
}
}
}