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

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

Powered by Google App Engine
This is Rietveld 408576698