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

Side by Side Diff: samplecode/SampleAnimatedText.cpp

Issue 1454653002: Fix skia_gpu=0 build (samplecode/SampleAnimatedText.cpp) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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
« 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 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
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);
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