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

Side by Side Diff: src/gpu/effects/GrConvolutionEffect.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 | « src/gpu/SkGrPixelRef.cpp ('k') | src/gpu/effects/GrTextureStripAtlas.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 "gl/builders/GrGLProgramBuilder.h" 8 #include "gl/builders/GrGLProgramBuilder.h"
9 #include "GrConvolutionEffect.h" 9 #include "GrConvolutionEffect.h"
10 #include "gl/GrGLEffect.h" 10 #include "gl/GrGLEffect.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 /////////////////////////////////////////////////////////////////////////////// 151 ///////////////////////////////////////////////////////////////////////////////
152 152
153 GrConvolutionEffect::GrConvolutionEffect(GrTexture* texture, 153 GrConvolutionEffect::GrConvolutionEffect(GrTexture* texture,
154 Direction direction, 154 Direction direction,
155 int radius, 155 int radius,
156 const float* kernel, 156 const float* kernel,
157 bool useBounds, 157 bool useBounds,
158 float bounds[2]) 158 float bounds[2])
159 : Gr1DKernelEffect(texture, direction, radius), fUseBounds(useBounds) { 159 : Gr1DKernelEffect(texture, direction, radius), fUseBounds(useBounds) {
160 SkASSERT(radius <= kMaxKernelRadius); 160 SkASSERT(radius <= kMaxKernelRadius);
161 SkASSERT(NULL != kernel); 161 SkASSERT(kernel);
162 int width = this->width(); 162 int width = this->width();
163 for (int i = 0; i < width; i++) { 163 for (int i = 0; i < width; i++) {
164 fKernel[i] = kernel[i]; 164 fKernel[i] = kernel[i];
165 } 165 }
166 memcpy(fBounds, bounds, sizeof(fBounds)); 166 memcpy(fBounds, bounds, sizeof(fBounds));
167 } 167 }
168 168
169 GrConvolutionEffect::GrConvolutionEffect(GrTexture* texture, 169 GrConvolutionEffect::GrConvolutionEffect(GrTexture* texture,
170 Direction direction, 170 Direction direction,
171 int radius, 171 int radius,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 bool useBounds = random->nextBool(); 234 bool useBounds = random->nextBool();
235 return GrConvolutionEffect::Create(textures[texIdx], 235 return GrConvolutionEffect::Create(textures[texIdx],
236 dir, 236 dir,
237 radius, 237 radius,
238 kernel, 238 kernel,
239 useBounds, 239 useBounds,
240 bounds); 240 bounds);
241 } 241 }
OLDNEW
« no previous file with comments | « src/gpu/SkGrPixelRef.cpp ('k') | src/gpu/effects/GrTextureStripAtlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698