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

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

Powered by Google App Engine
This is Rietveld 408576698