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

Side by Side Diff: samplecode/ClockFaceView.cpp

Issue 1312163008: Forward declare SkStrokeRec in SkPathEffect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « include/core/SkPathEffect.h ('k') | src/core/SkDraw.cpp » ('j') | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
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 "SkReadBuffer.h" 11 #include "SkReadBuffer.h"
12 #include "SkWriteBuffer.h" 12 #include "SkWriteBuffer.h"
13 #include "SkGradientShader.h" 13 #include "SkGradientShader.h"
14 #include "SkPath.h" 14 #include "SkPath.h"
15 #include "SkRegion.h" 15 #include "SkRegion.h"
16 #include "SkShader.h" 16 #include "SkShader.h"
17 #include "SkUtils.h" 17 #include "SkUtils.h"
18 #include "SkColorPriv.h" 18 #include "SkColorPriv.h"
19 #include "SkColorFilter.h" 19 #include "SkColorFilter.h"
20 #include "SkStrokeRec.h"
20 #include "SkTypeface.h" 21 #include "SkTypeface.h"
21 22
22 static inline SkPMColor rgb2gray(SkPMColor c) { 23 static inline SkPMColor rgb2gray(SkPMColor c) {
23 unsigned r = SkGetPackedR32(c); 24 unsigned r = SkGetPackedR32(c);
24 unsigned g = SkGetPackedG32(c); 25 unsigned g = SkGetPackedG32(c);
25 unsigned b = SkGetPackedB32(c); 26 unsigned b = SkGetPackedB32(c);
26 27
27 unsigned x = (r * 5 + g * 7 + b * 4) >> 4; 28 unsigned x = (r * 5 + g * 7 + b * 4) >> 4;
28 29
29 return SkPackARGB32(0, x, x, x) | (c & (SK_A32_MASK << SK_A32_SHIFT)); 30 return SkPackARGB32(0, x, x, x) | (c & (SK_A32_MASK << SK_A32_SHIFT));
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } 251 }
251 252
252 private: 253 private:
253 typedef SkView INHERITED; 254 typedef SkView INHERITED;
254 }; 255 };
255 256
256 ////////////////////////////////////////////////////////////////////////////// 257 //////////////////////////////////////////////////////////////////////////////
257 258
258 static SkView* MyFactory() { return new ClockFaceView; } 259 static SkView* MyFactory() { return new ClockFaceView; }
259 static SkViewRegister reg(MyFactory); 260 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/core/SkPathEffect.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698