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

Unified Diff: gm/dftext.cpp

Issue 630103003: Reduce sizes in dftext GM on Android to match desktop better. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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/dftext.cpp
diff --git a/gm/dftext.cpp b/gm/dftext.cpp
index 5f58cb91ffa4dc6dae5c87a653af07857855b308..acaffb2e1c3e44556f18c0cd38b270985a546478 100755
--- a/gm/dftext.cpp
+++ b/gm/dftext.cpp
@@ -41,7 +41,11 @@ protected:
}
virtual void onDraw(SkCanvas* inputCanvas) {
+#if SK_BUILD_FOR_ANDROID
+ SkScalar textSizes[] = { 9.0f, 9.0f*2.0f, 9.0f*5.0f, 9.0f*2.0f*5.0f };
+#else
SkScalar textSizes[] = { 11.0f, 11.0f*2.0f, 11.0f*5.0f, 11.0f*2.0f*5.0f };
+#endif
SkScalar scales[] = { 2.0f*5.0f, 5.0f, 2.0f, 1.0f };
// set up offscreen rendering with distance field text
@@ -150,7 +154,11 @@ protected:
x = SkIntToScalar(680);
y = SkIntToScalar(270);
+#if SK_BUILD_FOR_ANDROID
+ paint.setTextSize(SkIntToScalar(19));
+#else
paint.setTextSize(SkIntToScalar(22));
+#endif
for (size_t i = 0; i < SK_ARRAY_COUNT(fg); ++i) {
paint.setColor(fg[i]);
@@ -164,7 +172,11 @@ protected:
x = SkIntToScalar(830);
y = SkIntToScalar(270);
+#if SK_BUILD_FOR_ANDROID
+ paint.setTextSize(SkIntToScalar(19));
+#else
paint.setTextSize(SkIntToScalar(22));
+#endif
for (size_t i = 0; i < SK_ARRAY_COUNT(fg); ++i) {
paint.setColor(fg[i]);
« 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