aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/fontcache.cpp
diff options
context:
space:
mode:
authorGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-10 07:01:40 +0000
committerGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-10 07:01:40 +0000
commitf29c3802899c3e1e285a44140eb32cfa329764dc (patch)
tree5d2f1cf2f3eb5eeb362b06838b45d09383d3ed99 /gm/fontcache.cpp
parent824c346b6e0e114063c1a8ad4ba7c3a669ee2cff (diff)
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11691 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/fontcache.cpp')
-rw-r--r--gm/fontcache.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/gm/fontcache.cpp b/gm/fontcache.cpp
index ecaa354b61..cb73e91377 100644
--- a/gm/fontcache.cpp
+++ b/gm/fontcache.cpp
@@ -10,7 +10,7 @@
#include "SkGraphics.h"
#include "SkTypeface.h"
-// GM to stress the GPU font cache
+// GM to stress the GPU font cache
const char* gFamilyNames[] = {
"sans-serif", "serif", "monospace"
@@ -45,7 +45,7 @@ public:
SkSafeUnref(fTypefaces[i]);
}
}
-
+
protected:
virtual SkString onShortName() SK_OVERRIDE {
return SkString("fontcache");
@@ -64,7 +64,7 @@ protected:
}
}
}
-
+
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
SkScalar y = 32;
SkPaint paint;
@@ -78,29 +78,29 @@ protected:
for (size_t i = 0; i < 2; ++i) {
paint.setTypeface(fTypefaces[i]);
SkScalar x = 20;
-
+
for (size_t j = 0; j < SK_ARRAY_COUNT(gTextSizes); ++j) {
paint.setTextSize(gTextSizes[j]);
x = draw_string(canvas, text, x, y, paint) + 19;
}
y += 32;
}
-
+
// force a flush
canvas->flush();
-
+
// draw again, and more to overflow the cache
for (size_t i = 0; i < TYPEFACE_COUNT; ++i) {
paint.setTypeface(fTypefaces[i]);
SkScalar x = 20;
-
+
for (size_t j = 0; j < SK_ARRAY_COUNT(gTextSizes); ++j) {
paint.setTextSize(gTextSizes[j]);
x = draw_string(canvas, text, x, y, paint) + 19;
}
y += 32;
}
-
+
}
virtual uint32_t onGetFlags() const SK_OVERRIDE {
@@ -117,4 +117,3 @@ private:
//////////////////////////////////////////////////////////////////////////////
DEF_GM( return SkNEW(FontCacheGM); )
-