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

Side by Side Diff: gm/composeshader.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT 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 | « gm/complexclip.cpp ('k') | gm/conicpaths.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "gm.h" 8 #include "gm.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 17 matching lines...) Expand all
28 28
29 pts[0].set(0, 0); 29 pts[0].set(0, 0);
30 pts[1].set(0, SkIntToScalar(100)); 30 pts[1].set(0, SkIntToScalar(100));
31 colors[0] = SK_ColorBLACK; 31 colors[0] = SK_ColorBLACK;
32 colors[1] = SkColorSetARGB(0x80, 0, 0, 0); 32 colors[1] = SkColorSetARGB(0x80, 0, 0, 0);
33 SkAutoTUnref<SkShader> shaderB(SkGradientShader::CreateLinear(pts, colors, N ULL, 2, 33 SkAutoTUnref<SkShader> shaderB(SkGradientShader::CreateLinear(pts, colors, N ULL, 2,
34 SkShader::kCla mp_TileMode)); 34 SkShader::kCla mp_TileMode));
35 35
36 SkAutoTUnref<SkXfermode> xfer(SkXfermode::Create(mode)); 36 SkAutoTUnref<SkXfermode> xfer(SkXfermode::Create(mode));
37 37
38 return SkNEW_ARGS(SkComposeShader, (shaderA, shaderB, xfer)); 38 return new SkComposeShader(shaderA, shaderB, xfer);
39 } 39 }
40 40
41 class ComposeShaderGM : public skiagm::GM { 41 class ComposeShaderGM : public skiagm::GM {
42 public: 42 public:
43 ComposeShaderGM() { 43 ComposeShaderGM() {
44 fShader = make_shader(SkXfermode::kDstIn_Mode); 44 fShader = make_shader(SkXfermode::kDstIn_Mode);
45 } 45 }
46 46
47 virtual ~ComposeShaderGM() { 47 virtual ~ComposeShaderGM() {
48 SkSafeUnref(fShader); 48 SkSafeUnref(fShader);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 canvas->restore(); 114 canvas->restore();
115 canvas->translate(0, r.height() + 5); 115 canvas->translate(0, r.height() + 5);
116 } 116 }
117 } 117 }
118 }; 118 };
119 119
120 ////////////////////////////////////////////////////////////////////////////// 120 //////////////////////////////////////////////////////////////////////////////
121 121
122 DEF_GM( return new ComposeShaderGM; ) 122 DEF_GM( return new ComposeShaderGM; )
123 DEF_GM( return new ComposeShaderAlphaGM; ) 123 DEF_GM( return new ComposeShaderAlphaGM; )
OLDNEW
« no previous file with comments | « gm/complexclip.cpp ('k') | gm/conicpaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698