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

Side by Side Diff: gm/modecolorfilters.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/mixedtextblobs.cpp ('k') | gm/multipicturedraw.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 #include "SkBitmapProcShader.h" 9 #include "SkBitmapProcShader.h"
10 #include "SkColorFilter.h" 10 #include "SkColorFilter.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 SkCanvas canvas(bmp); 42 SkCanvas canvas(bmp);
43 canvas.clear(sk_tool_utils::color_to_565(0xFF800000)); 43 canvas.clear(sk_tool_utils::color_to_565(0xFF800000));
44 SkPaint paint; 44 SkPaint paint;
45 paint.setColor(sk_tool_utils::color_to_565(0xFF000080)); 45 paint.setColor(sk_tool_utils::color_to_565(0xFF000080));
46 SkRect rect0 = SkRect::MakeXYWH(0, 0, 46 SkRect rect0 = SkRect::MakeXYWH(0, 0,
47 SkIntToScalar(checkSize), SkIntToScalar(chec kSize)); 47 SkIntToScalar(checkSize), SkIntToScalar(chec kSize));
48 SkRect rect1 = SkRect::MakeXYWH(SkIntToScalar(checkSize), SkIntToScalar(chec kSize), 48 SkRect rect1 = SkRect::MakeXYWH(SkIntToScalar(checkSize), SkIntToScalar(chec kSize),
49 SkIntToScalar(checkSize), SkIntToScalar(chec kSize)); 49 SkIntToScalar(checkSize), SkIntToScalar(chec kSize));
50 canvas.drawRect(rect1, paint); 50 canvas.drawRect(rect1, paint);
51 canvas.drawRect(rect0, paint); 51 canvas.drawRect(rect0, paint);
52 return SkNEW_ARGS(SkBitmapProcShader, (bmp, SkShader::kRepeat_TileMode, 52 return new SkBitmapProcShader(bmp, SkShader::kRepeat_TileMode, SkShader::kRe peat_TileMode);
53 SkShader::kRepeat_TileMode));
54 } 53 }
55 54
56 class ModeColorFilterGM : public GM { 55 class ModeColorFilterGM : public GM {
57 public: 56 public:
58 ModeColorFilterGM() { 57 ModeColorFilterGM() {
59 this->setBGColor(sk_tool_utils::color_to_565(0xFF303030)); 58 this->setBGColor(sk_tool_utils::color_to_565(0xFF303030));
60 } 59 }
61 60
62 protected: 61 protected:
63 virtual SkString onShortName() { 62 virtual SkString onShortName() {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 SkAutoTUnref<SkShader> fBmpShader; 156 SkAutoTUnref<SkShader> fBmpShader;
158 typedef GM INHERITED; 157 typedef GM INHERITED;
159 }; 158 };
160 159
161 ////////////////////////////////////////////////////////////////////////////// 160 //////////////////////////////////////////////////////////////////////////////
162 161
163 static GM* MyFactory(void*) { return new ModeColorFilterGM; } 162 static GM* MyFactory(void*) { return new ModeColorFilterGM; }
164 static GMRegistry reg(MyFactory); 163 static GMRegistry reg(MyFactory);
165 164
166 } 165 }
OLDNEW
« no previous file with comments | « gm/mixedtextblobs.cpp ('k') | gm/multipicturedraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698