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

Side by Side Diff: gm/xfermodeimagefilter.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 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/verylargebitmap.cpp ('k') | gm/xfermodes.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 2013 Google Inc. 2 * Copyright 2013 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 "sk_tool_utils.h" 9 #include "sk_tool_utils.h"
10 #include "SkArithmeticMode.h" 10 #include "SkArithmeticMode.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Test arithmetic mode as image filter 131 // Test arithmetic mode as image filter
132 SkAutoTUnref<SkXfermode> mode(SkArithmeticMode::Create(0, SK_Scalar1, SK _Scalar1, 0)); 132 SkAutoTUnref<SkXfermode> mode(SkArithmeticMode::Create(0, SK_Scalar1, SK _Scalar1, 0));
133 SkAutoTUnref<SkImageFilter> filter(SkXfermodeImageFilter::Create(mode, b ackground)); 133 SkAutoTUnref<SkImageFilter> filter(SkXfermodeImageFilter::Create(mode, b ackground));
134 paint.setImageFilter(filter); 134 paint.setImageFilter(filter);
135 drawClippedBitmap(canvas, fBitmap, paint, x, y); 135 drawClippedBitmap(canvas, fBitmap, paint, x, y);
136 x += fBitmap.width() + MARGIN; 136 x += fBitmap.width() + MARGIN;
137 if (x + fBitmap.width() > WIDTH) { 137 if (x + fBitmap.width() > WIDTH) {
138 x = 0; 138 x = 0;
139 y += fBitmap.height() + MARGIN; 139 y += fBitmap.height() + MARGIN;
140 } 140 }
141 // Test NULL mode 141 // Test nullptr mode
142 filter.reset(SkXfermodeImageFilter::Create(NULL, background)); 142 filter.reset(SkXfermodeImageFilter::Create(nullptr, background));
143 paint.setImageFilter(filter); 143 paint.setImageFilter(filter);
144 drawClippedBitmap(canvas, fBitmap, paint, x, y); 144 drawClippedBitmap(canvas, fBitmap, paint, x, y);
145 x += fBitmap.width() + MARGIN; 145 x += fBitmap.width() + MARGIN;
146 if (x + fBitmap.width() > WIDTH) { 146 if (x + fBitmap.width() > WIDTH) {
147 x = 0; 147 x = 0;
148 y += fBitmap.height() + MARGIN; 148 y += fBitmap.height() + MARGIN;
149 } 149 }
150 SkRect clipRect = SkRect::MakeWH(SkIntToScalar(fBitmap.width() + 4), 150 SkRect clipRect = SkRect::MakeWH(SkIntToScalar(fBitmap.width() + 4),
151 SkIntToScalar(fBitmap.height() + 4)); 151 SkIntToScalar(fBitmap.height() + 4));
152 // Test offsets on SrcMode (uses fixed-function blend) 152 // Test offsets on SrcMode (uses fixed-function blend)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 private: 203 private:
204 SkBitmap fBitmap, fCheckerboard; 204 SkBitmap fBitmap, fCheckerboard;
205 typedef GM INHERITED; 205 typedef GM INHERITED;
206 }; 206 };
207 207
208 ////////////////////////////////////////////////////////////////////////////// 208 //////////////////////////////////////////////////////////////////////////////
209 209
210 DEF_GM( return new XfermodeImageFilterGM; ); 210 DEF_GM( return new XfermodeImageFilterGM; );
211 211
212 } 212 }
OLDNEW
« no previous file with comments | « gm/verylargebitmap.cpp ('k') | gm/xfermodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698