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

Side by Side Diff: samplecode/SampleBigGradient.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/SampleAtlas.cpp ('k') | samplecode/SampleBitmapRect.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 "SkGradientShader.h" 11 #include "SkGradientShader.h"
12 12
13 static SkShader* make_grad(SkScalar w, SkScalar h) { 13 static SkShader* make_grad(SkScalar w, SkScalar h) {
14 SkColor colors[] = { 0xFF000000, 0xFF333333 }; 14 SkColor colors[] = { 0xFF000000, 0xFF333333 };
15 SkPoint pts[] = { { 0, 0 }, { w, h } }; 15 SkPoint pts[] = { { 0, 0 }, { w, h } };
16 return SkGradientShader::CreateLinear(pts, colors, NULL, 2, 16 return SkGradientShader::CreateLinear(pts, colors, nullptr, 2,
17 SkShader::kClamp_TileMode); 17 SkShader::kClamp_TileMode);
18 } 18 }
19 19
20 class BigGradientView : public SampleView { 20 class BigGradientView : public SampleView {
21 public: 21 public:
22 BigGradientView() {} 22 BigGradientView() {}
23 23
24 protected: 24 protected:
25 // overrides from SkEventSink 25 // overrides from SkEventSink
26 virtual bool onQuery(SkEvent* evt) { 26 virtual bool onQuery(SkEvent* evt) {
(...skipping 13 matching lines...) Expand all
40 } 40 }
41 41
42 private: 42 private:
43 typedef SampleView INHERITED; 43 typedef SampleView INHERITED;
44 }; 44 };
45 45
46 /////////////////////////////////////////////////////////////////////////////// 46 ///////////////////////////////////////////////////////////////////////////////
47 47
48 static SkView* MyFactory() { return new BigGradientView; } 48 static SkView* MyFactory() { return new BigGradientView; }
49 static SkViewRegister reg(MyFactory); 49 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleAtlas.cpp ('k') | samplecode/SampleBitmapRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698