| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |