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

Side by Side Diff: gm/aarectmodes.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/aaclip.cpp ('k') | gm/aaxfermodes.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 2011 Google Inc. 2 * Copyright 2011 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 canvas->save(); 154 canvas->save();
155 for (size_t i = 0; i < SK_ARRAY_COUNT(gModes); ++i) { 155 for (size_t i = 0; i < SK_ARRAY_COUNT(gModes); ++i) {
156 if (6 == i) { 156 if (6 == i) {
157 canvas->restore(); 157 canvas->restore();
158 canvas->translate(W * 5, 0); 158 canvas->translate(W * 5, 0);
159 canvas->save(); 159 canvas->save();
160 } 160 }
161 SkXfermode* mode = SkXfermode::Create(gModes[i].fMode); 161 SkXfermode* mode = SkXfermode::Create(gModes[i].fMode);
162 162
163 canvas->drawRect(bounds, fBGPaint); 163 canvas->drawRect(bounds, fBGPaint);
164 canvas->saveLayer(&bounds, NULL); 164 canvas->saveLayer(&bounds, nullptr);
165 SkScalar dy = drawCell(canvas, mode, 165 SkScalar dy = drawCell(canvas, mode,
166 gAlphaValue[alpha & 1], 166 gAlphaValue[alpha & 1],
167 gAlphaValue[alpha & 2]); 167 gAlphaValue[alpha & 2]);
168 canvas->restore(); 168 canvas->restore();
169 169
170 canvas->translate(0, dy * 5 / 4); 170 canvas->translate(0, dy * 5 / 4);
171 SkSafeUnref(mode); 171 SkSafeUnref(mode);
172 } 172 }
173 canvas->restore(); 173 canvas->restore();
174 canvas->restore(); 174 canvas->restore();
175 canvas->translate(W * 5 / 4, 0); 175 canvas->translate(W * 5 / 4, 0);
176 } 176 }
177 } 177 }
178 178
179 private: 179 private:
180 typedef GM INHERITED; 180 typedef GM INHERITED;
181 }; 181 };
182 182
183 ////////////////////////////////////////////////////////////////////////////// 183 //////////////////////////////////////////////////////////////////////////////
184 184
185 static GM* MyFactory(void*) { return new AARectModesGM; } 185 static GM* MyFactory(void*) { return new AARectModesGM; }
186 static GMRegistry reg(MyFactory); 186 static GMRegistry reg(MyFactory);
187 187
188 } 188 }
OLDNEW
« no previous file with comments | « gm/aaclip.cpp ('k') | gm/aaxfermodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698