| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 | 7 |
| 8 #include "SampleCode.h" | 8 #include "SampleCode.h" |
| 9 #include "SkView.h" | 9 #include "SkView.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| 11 #include "SkUtils.h" | 11 #include "SkUtils.h" |
| 12 #include "SkColorPriv.h" | 12 #include "SkColorPriv.h" |
| 13 #include "SkColorFilter.h" | 13 #include "SkColorFilter.h" |
| 14 #if SK_SUPPORT_GPU | |
| 15 #include "SkGpuDevice.h" | |
| 16 #endif | |
| 17 #include "SkRandom.h" | 14 #include "SkRandom.h" |
| 18 #include "SkSystemEventTypes.h" | 15 #include "SkSystemEventTypes.h" |
| 19 #include "SkTime.h" | 16 #include "SkTime.h" |
| 20 #include "SkTypeface.h" | 17 #include "SkTypeface.h" |
| 21 #include "SkXfermode.h" | 18 #include "SkXfermode.h" |
| 22 #include "Timer.h" | 19 #include "Timer.h" |
| 23 | 20 |
| 21 #if SK_SUPPORT_GPU |
| 24 #include "GrContext.h" | 22 #include "GrContext.h" |
| 23 #include "SkGpuDevice.h" |
| 24 #endif |
| 25 | 25 |
| 26 SkRandom gRand; | 26 SkRandom gRand; |
| 27 | 27 |
| 28 static void DrawTheText(SkCanvas* canvas, const char text[], size_t length, SkSc
alar x, SkScalar y, | 28 static void DrawTheText(SkCanvas* canvas, const char text[], size_t length, SkSc
alar x, SkScalar y, |
| 29 const SkPaint& paint) { | 29 const SkPaint& paint) { |
| 30 SkPaint p(paint); | 30 SkPaint p(paint); |
| 31 | 31 |
| 32 p.setSubpixelText(true); | 32 p.setSubpixelText(true); |
| 33 canvas->drawText(text, length, x, y, p); | 33 canvas->drawText(text, length, x, y, p); |
| 34 } | 34 } |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 int fCurrentTime; | 155 int fCurrentTime; |
| 156 | 156 |
| 157 | 157 |
| 158 typedef SampleView INHERITED; | 158 typedef SampleView INHERITED; |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 ////////////////////////////////////////////////////////////////////////////// | 161 ////////////////////////////////////////////////////////////////////////////// |
| 162 | 162 |
| 163 static SkView* MyFactory() { return new AnimatedTextView; } | 163 static SkView* MyFactory() { return new AnimatedTextView; } |
| 164 static SkViewRegister reg(MyFactory); | 164 static SkViewRegister reg(MyFactory); |
| OLD | NEW |