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

Side by Side Diff: gm/xfermodes2.cpp

Issue 22918012: Add luminance mask transfer modes. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 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 "gm.h" 8 #include "gm.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
11 #include "SkXfermode.h" 11 #include "SkXfermode.h"
12 #include "SkColorPriv.h" 12 #include "SkColorPriv.h"
13 13
14 namespace skiagm { 14 namespace skiagm {
15 15
16 class Xfermodes2GM : public GM { 16 class Xfermodes2GM : public GM {
17 public: 17 public:
18 Xfermodes2GM() {} 18 Xfermodes2GM() {}
19 19
20 protected: 20 protected:
21 virtual SkString onShortName() SK_OVERRIDE { 21 virtual SkString onShortName() SK_OVERRIDE {
22 return SkString("xfermodes2"); 22 return SkString("xfermodes2");
23 } 23 }
24 24
25 virtual SkISize onISize() SK_OVERRIDE { 25 virtual SkISize onISize() SK_OVERRIDE {
26 return make_isize(455, 475); 26 return make_isize(455, 564);
27 } 27 }
28 28
29 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 29 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
30 canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); 30 canvas->translate(SkIntToScalar(10), SkIntToScalar(20));
31 31
32 const SkScalar w = SkIntToScalar(kSize); 32 const SkScalar w = SkIntToScalar(kSize);
33 const SkScalar h = SkIntToScalar(kSize); 33 const SkScalar h = SkIntToScalar(kSize);
34 34
35 SkPaint labelP; 35 SkPaint labelP;
36 labelP.setAntiAlias(true); 36 labelP.setAntiAlias(true);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 typedef GM INHERITED; 152 typedef GM INHERITED;
153 }; 153 };
154 154
155 ////////////////////////////////////////////////////////////////////////////// 155 //////////////////////////////////////////////////////////////////////////////
156 156
157 static GM* MyFactory(void*) { return new Xfermodes2GM; } 157 static GM* MyFactory(void*) { return new Xfermodes2GM; }
158 static GMRegistry reg(MyFactory); 158 static GMRegistry reg(MyFactory);
159 159
160 } 160 }
OLDNEW
« no previous file with comments | « gm/xfermodes.cpp ('k') | gm/xfermodes3.cpp » ('j') | include/core/SkXfermode.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698