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

Side by Side Diff: gm/fontscaler.cpp

Issue 22262002: Re-enable fontscaler GM for Android (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Remove font cache changes Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "gm.h" 7 #include "gm.h"
8 #include "SkTypeface.h" 8 #include "SkTypeface.h"
9 9
10 namespace skiagm { 10 namespace skiagm {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 canvas->drawText(text, textLen, x, y, paint); 73 canvas->drawText(text, textLen, x, y, paint);
74 y += paint.getFontMetrics(NULL); 74 y += paint.getFontMetrics(NULL);
75 index += 1; 75 index += 1;
76 } 76 }
77 } 77 }
78 canvas->translate(0, SkIntToScalar(360)); 78 canvas->translate(0, SkIntToScalar(360));
79 paint.setSubpixelText(true); 79 paint.setSubpixelText(true);
80 } 80 }
81 } 81 }
82 82
83 #ifdef SK_BUILD_FOR_ANDROID
84 virtual uint32_t onGetFlags() const SK_OVERRIDE {
85 // On android, we fail due to bad gpu drivers (it seems) by adding too
86 // much to our text atlas (texture).
87 return kSkipGPU_Flag;
88 }
89 #endif
90
91 private: 83 private:
92 typedef GM INHERITED; 84 typedef GM INHERITED;
93 }; 85 };
94 86
95 ////////////////////////////////////////////////////////////////////////////// 87 //////////////////////////////////////////////////////////////////////////////
96 88
97 static GM* MyFactory(void*) { return new FontScalerGM; } 89 static GM* MyFactory(void*) { return new FontScalerGM; }
98 static GMRegistry reg(MyFactory); 90 static GMRegistry reg(MyFactory);
99 91
100 } 92 }
OLDNEW
« 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