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

Side by Side Diff: gm/blurrect.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/blend.cpp ('k') | gm/blurs.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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 if (cur_x + bm.width() >= fGMWidth - fMargin) { 229 if (cur_x + bm.width() >= fGMWidth - fMargin) {
230 cur_x = 0; 230 cur_x = 0;
231 cur_y += max_height + fPadding; 231 cur_y += max_height + fPadding;
232 max_height = 0; 232 max_height = 0;
233 } 233 }
234 234
235 canvas->save(); 235 canvas->save();
236 canvas->translate((SkScalar)cur_x, (SkScalar)cur_y); 236 canvas->translate((SkScalar)cur_x, (SkScalar)cur_y);
237 canvas->translate(-(bm.width() - r.width())/2, -(bm.height() -r.height())/2); 237 canvas->translate(-(bm.width() - r.width())/2, -(bm.height() -r.height())/2);
238 canvas->drawBitmap(bm, 0.f, 0.f, NULL); 238 canvas->drawBitmap(bm, 0.f, 0.f, nullptr);
239 canvas->restore(); 239 canvas->restore();
240 240
241 cur_x += bm.width() + fPadding; 241 cur_x += bm.width() + fPadding;
242 if (bm.height() > max_height) 242 if (bm.height() > max_height)
243 max_height = bm.height(); 243 max_height = bm.height();
244 } 244 }
245 } 245 }
246 } 246 }
247 } 247 }
248 248
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 return; 306 return;
307 } 307 }
308 SkAutoMaskFreeImage amfi(mask.fImage); 308 SkAutoMaskFreeImage amfi(mask.fImage);
309 309
310 SkBitmap bm; 310 SkBitmap bm;
311 bm.installMaskPixels(mask); 311 bm.installMaskPixels(mask);
312 312
313 center_x = (canvas_size.fWidth - mask.fBounds.width())/2; 313 center_x = (canvas_size.fWidth - mask.fBounds.width())/2;
314 center_y = (canvas_size.fHeight - mask.fBounds.height())/2; 314 center_y = (canvas_size.fHeight - mask.fBounds.height())/2;
315 315
316 canvas->drawBitmap(bm, SkIntToScalar(center_x), SkIntToScalar(center_y), NULL); 316 canvas->drawBitmap(bm, SkIntToScalar(center_x), SkIntToScalar(center_y), nullptr);
317 } 317 }
318 318
319 private: 319 private:
320 typedef GM INHERITED; 320 typedef GM INHERITED;
321 }; 321 };
322 322
323 class BlurRectFastGM: public BlurRectCompareGM { 323 class BlurRectFastGM: public BlurRectCompareGM {
324 public: 324 public:
325 BlurRectFastGM(const char name[], unsigned int rectWidth, 325 BlurRectFastGM(const char name[], unsigned int rectWidth,
326 unsigned int rectHeight, float blurRadius, 326 unsigned int rectHeight, float blurRadius,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 411 }
412 private: 412 private:
413 typedef BlurRectCompareGM INHERITED; 413 typedef BlurRectCompareGM INHERITED;
414 }; 414 };
415 415
416 416
417 ////////////////////////////////////////////////////////////////////////////// 417 //////////////////////////////////////////////////////////////////////////////
418 418
419 DEF_GM(return new BlurRectGM("blurrects", 0xFF);) 419 DEF_GM(return new BlurRectGM("blurrects", 0xFF);)
420 DEF_GM(return new BlurRectDirectGM("blurrect_gallery");) 420 DEF_GM(return new BlurRectDirectGM("blurrect_gallery");)
OLDNEW
« no previous file with comments | « gm/blend.cpp ('k') | gm/blurs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698