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

Side by Side Diff: samplecode/SampleAARectModes.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 | « samplecode/Sample2PtRadial.cpp ('k') | samplecode/SampleAll.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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 canvas->save(); 105 canvas->save();
106 for (size_t i = 0; i < SK_ARRAY_COUNT(gModes); ++i) { 106 for (size_t i = 0; i < SK_ARRAY_COUNT(gModes); ++i) {
107 if (6 == i) { 107 if (6 == i) {
108 canvas->restore(); 108 canvas->restore();
109 canvas->translate(W * 5, 0); 109 canvas->translate(W * 5, 0);
110 canvas->save(); 110 canvas->save();
111 } 111 }
112 SkXfermode* mode = SkXfermode::Create(gModes[i].fMode); 112 SkXfermode* mode = SkXfermode::Create(gModes[i].fMode);
113 113
114 canvas->drawRect(bounds, fBGPaint); 114 canvas->drawRect(bounds, fBGPaint);
115 canvas->saveLayer(&bounds, NULL); 115 canvas->saveLayer(&bounds, nullptr);
116 SkScalar dy = drawCell(canvas, mode, 116 SkScalar dy = drawCell(canvas, mode,
117 gAlphaValue[alpha & 1], 117 gAlphaValue[alpha & 1],
118 gAlphaValue[alpha & 2]); 118 gAlphaValue[alpha & 2]);
119 canvas->restore(); 119 canvas->restore();
120 120
121 canvas->translate(0, dy * 5 / 4); 121 canvas->translate(0, dy * 5 / 4);
122 SkSafeUnref(mode); 122 SkSafeUnref(mode);
123 } 123 }
124 canvas->restore(); 124 canvas->restore();
125 canvas->restore(); 125 canvas->restore();
126 canvas->translate(W * 5 / 4, 0); 126 canvas->translate(W * 5 / 4, 0);
127 } 127 }
128 } 128 }
129 129
130 private: 130 private:
131 typedef SampleView INHERITED; 131 typedef SampleView INHERITED;
132 }; 132 };
133 133
134 /////////////////////////////////////////////////////////////////////////////// 134 ///////////////////////////////////////////////////////////////////////////////
135 135
136 static SkView* MyFactory() { return new AARectsModesView; } 136 static SkView* MyFactory() { return new AARectsModesView; }
137 static SkViewRegister reg(MyFactory); 137 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/Sample2PtRadial.cpp ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698