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

Side by Side Diff: gm/samplerstress.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 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/imagefiltersgraph.cpp ('k') | gm/xfermodes3.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 2012 Google Inc. 2 * Copyright 2012 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 "SkShader.h" 10 #include "SkShader.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if ((x % 7) == 0) { 64 if ((x % 7) == 0) {
65 addr[y*xSize+x] = SkPreMultiplyColor(SK_ColorGREEN); 65 addr[y*xSize+x] = SkPreMultiplyColor(SK_ColorGREEN);
66 } 66 }
67 } 67 }
68 } 68 }
69 69
70 fTextureCreated = true; 70 fTextureCreated = true;
71 } 71 }
72 72
73 void createShader() { 73 void createShader() {
74 if (NULL != fShader.get()) { 74 if (fShader.get()) {
75 return; 75 return;
76 } 76 }
77 77
78 createTexture(); 78 createTexture();
79 79
80 fShader.reset(SkShader::CreateBitmapShader(fTexture, 80 fShader.reset(SkShader::CreateBitmapShader(fTexture,
81 SkShader::kRepeat_TileMode, 81 SkShader::kRepeat_TileMode,
82 SkShader::kRepeat_TileMode)); 82 SkShader::kRepeat_TileMode));
83 } 83 }
84 84
85 void createMaskFilter() { 85 void createMaskFilter() {
86 if (NULL != fMaskFilter.get()) { 86 if (fMaskFilter.get()) {
87 return; 87 return;
88 } 88 }
89 89
90 const SkScalar sigma = 1; 90 const SkScalar sigma = 1;
91 fMaskFilter.reset(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, sigma)); 91 fMaskFilter.reset(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, sigma));
92 } 92 }
93 93
94 virtual void onDraw(SkCanvas* canvas) { 94 virtual void onDraw(SkCanvas* canvas) {
95 95
96 createShader(); 96 createShader();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 typedef GM INHERITED; 149 typedef GM INHERITED;
150 }; 150 };
151 151
152 ////////////////////////////////////////////////////////////////////////////// 152 //////////////////////////////////////////////////////////////////////////////
153 153
154 static GM* MyFactory(void*) { return new SamplerStressGM; } 154 static GM* MyFactory(void*) { return new SamplerStressGM; }
155 static GMRegistry reg(MyFactory); 155 static GMRegistry reg(MyFactory);
156 156
157 } 157 }
OLDNEW
« no previous file with comments | « gm/imagefiltersgraph.cpp ('k') | gm/xfermodes3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698