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

Side by Side Diff: gm/xfermodes.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/xfermodeimagefilter.cpp ('k') | gm/xfermodes2.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 "gm.h" 8 #include "gm.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 SkXfermode* mode = SkXfermode::Create(gModes[i].fMode); 248 SkXfermode* mode = SkXfermode::Create(gModes[i].fMode);
249 SkAutoUnref aur(mode); 249 SkAutoUnref aur(mode);
250 SkRect r; 250 SkRect r;
251 r.set(x, y, x+w, y+h); 251 r.set(x, y, x+w, y+h);
252 252
253 SkPaint p; 253 SkPaint p;
254 p.setStyle(SkPaint::kFill_Style); 254 p.setStyle(SkPaint::kFill_Style);
255 p.setShader(s); 255 p.setShader(s);
256 canvas->drawRect(r, p); 256 canvas->drawRect(r, p);
257 257
258 canvas->saveLayer(&r, NULL); 258 canvas->saveLayer(&r, nullptr);
259 draw_mode(canvas, mode, static_cast<SrcType>(sourceType), 259 draw_mode(canvas, mode, static_cast<SrcType>(sourceType),
260 r.fLeft, r.fTop); 260 r.fLeft, r.fTop);
261 canvas->restore(); 261 canvas->restore();
262 262
263 r.inset(-SK_ScalarHalf, -SK_ScalarHalf); 263 r.inset(-SK_ScalarHalf, -SK_ScalarHalf);
264 p.setStyle(SkPaint::kStroke_Style); 264 p.setStyle(SkPaint::kStroke_Style);
265 p.setShader(NULL); 265 p.setShader(nullptr);
266 canvas->drawRect(r, p); 266 canvas->drawRect(r, p);
267 267
268 #if 1 268 #if 1
269 canvas->drawText(gModes[i].fLabel, strlen(gModes[i].fLabel), 269 canvas->drawText(gModes[i].fLabel, strlen(gModes[i].fLabel),
270 x + w/2, y - labelP.getTextSize()/2, labelP); 270 x + w/2, y - labelP.getTextSize()/2, labelP);
271 #endif 271 #endif
272 x += w + SkIntToScalar(10); 272 x += w + SkIntToScalar(10);
273 if ((i % W) == W - 1) { 273 if ((i % W) == W - 1) {
274 x = x0; 274 x = x0;
275 y += h + SkIntToScalar(30); 275 y += h + SkIntToScalar(30);
(...skipping 15 matching lines...) Expand all
291 private: 291 private:
292 typedef GM INHERITED; 292 typedef GM INHERITED;
293 }; 293 };
294 294
295 ////////////////////////////////////////////////////////////////////////////// 295 //////////////////////////////////////////////////////////////////////////////
296 296
297 static GM* MyFactory(void*) { return new XfermodesGM; } 297 static GM* MyFactory(void*) { return new XfermodesGM; }
298 static GMRegistry reg(MyFactory); 298 static GMRegistry reg(MyFactory);
299 299
300 } 300 }
OLDNEW
« no previous file with comments | « gm/xfermodeimagefilter.cpp ('k') | gm/xfermodes2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698