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

Side by Side Diff: src/gpu/effects/GrMatrixConvolutionEffect.cpp

Issue 654313002: Auto-compare GrProcessors' texture accesses in isEqual(). (Closed) Base URL: https://skia.googlesource.com/skia.git@xformcomp
Patch Set: update Created 6 years, 2 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
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 #include "gl/builders/GrGLProgramBuilder.h" 7 #include "gl/builders/GrGLProgramBuilder.h"
8 #include "GrMatrixConvolutionEffect.h" 8 #include "GrMatrixConvolutionEffect.h"
9 #include "gl/GrGLProcessor.h" 9 #include "gl/GrGLProcessor.h"
10 #include "gl/GrGLSL.h" 10 #include "gl/GrGLSL.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 GrMatrixConvolutionEffect::~GrMatrixConvolutionEffect() { 172 GrMatrixConvolutionEffect::~GrMatrixConvolutionEffect() {
173 } 173 }
174 174
175 const GrBackendFragmentProcessorFactory& GrMatrixConvolutionEffect::getFactory() const { 175 const GrBackendFragmentProcessorFactory& GrMatrixConvolutionEffect::getFactory() const {
176 return GrTBackendFragmentProcessorFactory<GrMatrixConvolutionEffect>::getIns tance(); 176 return GrTBackendFragmentProcessorFactory<GrMatrixConvolutionEffect>::getIns tance();
177 } 177 }
178 178
179 bool GrMatrixConvolutionEffect::onIsEqual(const GrFragmentProcessor& sBase) cons t { 179 bool GrMatrixConvolutionEffect::onIsEqual(const GrFragmentProcessor& sBase) cons t {
180 const GrMatrixConvolutionEffect& s = sBase.cast<GrMatrixConvolutionEffect>() ; 180 const GrMatrixConvolutionEffect& s = sBase.cast<GrMatrixConvolutionEffect>() ;
181 return this->texture(0) == s.texture(0) && 181 return fKernelSize == s.kernelSize() &&
182 fKernelSize == s.kernelSize() &&
183 !memcmp(fKernel, s.kernel(), 182 !memcmp(fKernel, s.kernel(),
184 fKernelSize.width() * fKernelSize.height() * sizeof(float)) & & 183 fKernelSize.width() * fKernelSize.height() * sizeof(float)) & &
185 fGain == s.gain() && 184 fGain == s.gain() &&
186 fBias == s.bias() && 185 fBias == s.bias() &&
187 fKernelOffset == s.kernelOffset() && 186 fKernelOffset == s.kernelOffset() &&
188 fConvolveAlpha == s.convolveAlpha() && 187 fConvolveAlpha == s.convolveAlpha() &&
189 fDomain == s.domain(); 188 fDomain == s.domain();
190 } 189 }
191 190
192 // Static function to create a 2D convolution 191 // Static function to create a 2D convolution
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 return GrMatrixConvolutionEffect::Create(textures[texIdx], 265 return GrMatrixConvolutionEffect::Create(textures[texIdx],
267 bounds, 266 bounds,
268 kernelSize, 267 kernelSize,
269 kernel.get(), 268 kernel.get(),
270 gain, 269 gain,
271 bias, 270 bias,
272 kernelOffset, 271 kernelOffset,
273 tileMode, 272 tileMode,
274 convolveAlpha); 273 convolveAlpha);
275 } 274 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDistanceFieldTextureEffect.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698