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

Side by Side Diff: gm/colorcube.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/blurs.cpp ('k') | gm/coloremoji.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 2014 Google Inc. 2 * Copyright 2014 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 "SkColorCubeFilter.h" 9 #include "SkColorCubeFilter.h"
10 #include "SkBitmapSource.h" 10 #include "SkBitmapSource.h"
11 #include "SkData.h" 11 #include "SkData.h"
12 #include "SkGradientShader.h" 12 #include "SkGradientShader.h"
13 13
14 namespace skiagm { 14 namespace skiagm {
15 15
16 static SkShader* MakeLinear() { 16 static SkShader* MakeLinear() {
17 static const SkPoint pts[2] = { 17 static const SkPoint pts[2] = {
18 { 0, 0 }, 18 { 0, 0 },
19 { SkIntToScalar(80), SkIntToScalar(80) } 19 { SkIntToScalar(80), SkIntToScalar(80) }
20 }; 20 };
21 static const SkColor colors[] = { SK_ColorYELLOW, SK_ColorBLUE }; 21 static const SkColor colors[] = { SK_ColorYELLOW, SK_ColorBLUE };
22 return SkGradientShader::CreateLinear( 22 return SkGradientShader::CreateLinear(
23 pts, colors, NULL, 2, SkShader::kRepeat_TileMode, 0, &SkMatrix::I()); 23 pts, colors, nullptr, 2, SkShader::kRepeat_TileMode, 0, &SkMatrix::I());
24 } 24 }
25 25
26 class ColorCubeGM : public GM { 26 class ColorCubeGM : public GM {
27 public: 27 public:
28 ColorCubeGM() 28 ColorCubeGM()
29 : fInitialized(false) 29 : fInitialized(false)
30 , f3DLut4(NULL) 30 , f3DLut4(nullptr)
31 , f3DLut8(NULL) 31 , f3DLut8(nullptr)
32 , f3DLut16(NULL) 32 , f3DLut16(nullptr)
33 , f3DLut32(NULL) 33 , f3DLut32(nullptr)
34 , f3DLut64(NULL) 34 , f3DLut64(nullptr)
35 { 35 {
36 this->setBGColor(0xFF000000); 36 this->setBGColor(0xFF000000);
37 } 37 }
38 38
39 ~ColorCubeGM() { 39 ~ColorCubeGM() {
40 SkSafeUnref(f3DLut4); 40 SkSafeUnref(f3DLut4);
41 SkSafeUnref(f3DLut8); 41 SkSafeUnref(f3DLut8);
42 SkSafeUnref(f3DLut16); 42 SkSafeUnref(f3DLut16);
43 SkSafeUnref(f3DLut32); 43 SkSafeUnref(f3DLut32);
44 SkSafeUnref(f3DLut64); 44 SkSafeUnref(f3DLut64);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 SkData* f3DLut32; 133 SkData* f3DLut32;
134 SkData* f3DLut64; 134 SkData* f3DLut64;
135 }; 135 };
136 136
137 ////////////////////////////////////////////////////////////////////////////// 137 //////////////////////////////////////////////////////////////////////////////
138 138
139 static GM* MyFactory(void*) { return new ColorCubeGM; } 139 static GM* MyFactory(void*) { return new ColorCubeGM; }
140 static GMRegistry reg(MyFactory); 140 static GMRegistry reg(MyFactory);
141 141
142 } 142 }
OLDNEW
« no previous file with comments | « gm/blurs.cpp ('k') | gm/coloremoji.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698