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

Side by Side Diff: samplecode/SampleClamp.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/SampleChart.cpp ('k') | samplecode/SampleClipDrawMatch.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
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"
11 #include "SkGraphics.h" 11 #include "SkGraphics.h"
12 #include "SkRandom.h" 12 #include "SkRandom.h"
13 #include "SkGradientShader.h" 13 #include "SkGradientShader.h"
14 #include "SkPicture.h" 14 #include "SkPicture.h"
15 15
16 static SkShader* make_linear() { 16 static SkShader* make_linear() {
17 SkPoint pts[] = { 0, 0, SK_Scalar1/500, SK_Scalar1/500 }; 17 SkPoint pts[] = { 0, 0, SK_Scalar1/500, SK_Scalar1/500 };
18 SkColor colors[] = { SK_ColorRED, SK_ColorBLUE }; 18 SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
19 return SkGradientShader::CreateLinear(pts, colors, NULL, 2, 19 return SkGradientShader::CreateLinear(pts, colors, nullptr, 2,
20 SkShader::kClamp_TileMode); 20 SkShader::kClamp_TileMode);
21 } 21 }
22 22
23 class ClampView : public SampleView { 23 class ClampView : public SampleView {
24 SkShader* fGrad; 24 SkShader* fGrad;
25 25
26 public: 26 public:
27 ClampView() { 27 ClampView() {
28 fGrad = make_linear(); 28 fGrad = make_linear();
29 } 29 }
(...skipping 28 matching lines...) Expand all
58 } 58 }
59 59
60 private: 60 private:
61 typedef SampleView INHERITED; 61 typedef SampleView INHERITED;
62 }; 62 };
63 63
64 ////////////////////////////////////////////////////////////////////////////// 64 //////////////////////////////////////////////////////////////////////////////
65 65
66 static SkView* MyFactory() { return new ClampView; } 66 static SkView* MyFactory() { return new ClampView; }
67 static SkViewRegister reg(MyFactory); 67 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleChart.cpp ('k') | samplecode/SampleClipDrawMatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698