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

Side by Side Diff: gm/morphology.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/modecolorfilters.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 "SkMorphologyImageFilter.h" 9 #include "SkMorphologyImageFilter.h"
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 { 140, 140, 0, 2 }, 66 { 140, 140, 0, 2 },
67 { 140, 140, 2, 0 }, 67 { 140, 140, 2, 0 },
68 { 140, 140, 2, 2 }, 68 { 140, 140, 2, 2 },
69 { 24, 24, 25, 25 }, 69 { 24, 24, 25, 25 },
70 }; 70 };
71 SkPaint paint; 71 SkPaint paint;
72 SkImageFilter::CropRect cropRect(SkRect::MakeXYWH(25, 20, 100, 80)); 72 SkImageFilter::CropRect cropRect(SkRect::MakeXYWH(25, 20, 100, 80));
73 73
74 for (unsigned j = 0; j < 4; ++j) { 74 for (unsigned j = 0; j < 4; ++j) {
75 for (unsigned i = 0; i < SK_ARRAY_COUNT(samples); ++i) { 75 for (unsigned i = 0; i < SK_ARRAY_COUNT(samples); ++i) {
76 const SkImageFilter::CropRect* cr = j & 0x02 ? &cropRect : NULL; 76 const SkImageFilter::CropRect* cr = j & 0x02 ? &cropRect : nullp tr;
77 if (j & 0x01) { 77 if (j & 0x01) {
78 paint.setImageFilter(SkErodeImageFilter::Create( 78 paint.setImageFilter(SkErodeImageFilter::Create(
79 samples[i].fRadiusX, 79 samples[i].fRadiusX,
80 samples[i].fRadiusY, 80 samples[i].fRadiusY,
81 NULL, 81 nullptr,
82 cr))->unref(); 82 cr))->unref();
83 } else { 83 } else {
84 paint.setImageFilter(SkDilateImageFilter::Create( 84 paint.setImageFilter(SkDilateImageFilter::Create(
85 samples[i].fRadiusX, 85 samples[i].fRadiusX,
86 samples[i].fRadiusY, 86 samples[i].fRadiusY,
87 NULL, 87 nullptr,
88 cr))->unref(); 88 cr))->unref();
89 } 89 }
90 drawClippedBitmap(canvas, paint, i * 140, j * 140); 90 drawClippedBitmap(canvas, paint, i * 140, j * 140);
91 } 91 }
92 } 92 }
93 } 93 }
94 94
95 private: 95 private:
96 typedef GM INHERITED; 96 typedef GM INHERITED;
97 SkBitmap fBitmap; 97 SkBitmap fBitmap;
98 bool fOnce; 98 bool fOnce;
99 }; 99 };
100 100
101 ////////////////////////////////////////////////////////////////////////////// 101 //////////////////////////////////////////////////////////////////////////////
102 102
103 static GM* MyFactory(void*) { return new MorphologyGM; } 103 static GM* MyFactory(void*) { return new MorphologyGM; }
104 static GMRegistry reg(MyFactory); 104 static GMRegistry reg(MyFactory);
105 105
106 } 106 }
OLDNEW
« no previous file with comments | « gm/modecolorfilters.cpp ('k') | gm/multipicturedraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698