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

Side by Side Diff: samplecode/ClockFaceView.cpp

Issue 860583002: remove unused SkAvoidXfermode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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/effects/SkAvoidXfermode.h ('k') | samplecode/SampleAll.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 "SkTypeface.h" 20 #include "SkTypeface.h"
21 #include "SkAvoidXfermode.h"
22 21
23 static inline SkPMColor rgb2gray(SkPMColor c) { 22 static inline SkPMColor rgb2gray(SkPMColor c) {
24 unsigned r = SkGetPackedR32(c); 23 unsigned r = SkGetPackedR32(c);
25 unsigned g = SkGetPackedG32(c); 24 unsigned g = SkGetPackedG32(c);
26 unsigned b = SkGetPackedB32(c); 25 unsigned b = SkGetPackedB32(c);
27 26
28 unsigned x = (r * 5 + g * 7 + b * 4) >> 4; 27 unsigned x = (r * 5 + g * 7 + b * 4) >> 4;
29 28
30 return SkPackARGB32(0, x, x, x) | (c & (SK_A32_MASK << SK_A32_SHIFT)); 29 return SkPackARGB32(0, x, x, x) | (c & (SK_A32_MASK << SK_A32_SHIFT));
31 } 30 }
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 245 }
247 246
248 private: 247 private:
249 typedef SkView INHERITED; 248 typedef SkView INHERITED;
250 }; 249 };
251 250
252 ////////////////////////////////////////////////////////////////////////////// 251 //////////////////////////////////////////////////////////////////////////////
253 252
254 static SkView* MyFactory() { return new ClockFaceView; } 253 static SkView* MyFactory() { return new ClockFaceView; }
255 static SkViewRegister reg(MyFactory); 254 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/effects/SkAvoidXfermode.h ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698