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

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

Issue 643743003: Create helper functions to use in computeInvariantOutput calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update blurMaskFilter 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
« no previous file with comments | « src/gpu/effects/GrMatrixConvolutionEffect.h ('k') | src/gpu/effects/GrOvalEffect.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 #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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 fConvolveAlpha = m.convolveAlpha(); 51 fConvolveAlpha = m.convolveAlpha();
52 } 52 }
53 53
54 void GrGLMatrixConvolutionEffect::emitCode(GrGLFPBuilder* builder, 54 void GrGLMatrixConvolutionEffect::emitCode(GrGLFPBuilder* builder,
55 const GrFragmentProcessor& fp, 55 const GrFragmentProcessor& fp,
56 const GrProcessorKey& key, 56 const GrProcessorKey& key,
57 const char* outputColor, 57 const char* outputColor,
58 const char* inputColor, 58 const char* inputColor,
59 const TransformedCoordsArray& coords, 59 const TransformedCoordsArray& coords,
60 const TextureSamplerArray& samplers) { 60 const TextureSamplerArray& samplers) {
61 sk_ignore_unused_variable(inputColor);
62 const GrTextureDomain& domain = fp.cast<GrMatrixConvolutionEffect>().domain( ); 61 const GrTextureDomain& domain = fp.cast<GrMatrixConvolutionEffect>().domain( );
63 62
64 fBoundsUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility, 63 fBoundsUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
65 kVec4f_GrSLType, "Bounds"); 64 kVec4f_GrSLType, "Bounds");
66 fImageIncrementUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visib ility, 65 fImageIncrementUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visib ility,
67 kVec2f_GrSLType, "ImageIncrement"); 66 kVec2f_GrSLType, "ImageIncrement");
68 fKernelUni = builder->addUniformArray(GrGLProgramBuilder::kFragment_Visibili ty, 67 fKernelUni = builder->addUniformArray(GrGLProgramBuilder::kFragment_Visibili ty,
69 kFloat_GrSLType, 68 kFloat_GrSLType,
70 "Kernel", 69 "Kernel",
71 fKernelSize.width() * fKernelSize.heig ht()); 70 fKernelSize.width() * fKernelSize.heig ht());
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 return GrMatrixConvolutionEffect::Create(textures[texIdx], 266 return GrMatrixConvolutionEffect::Create(textures[texIdx],
268 bounds, 267 bounds,
269 kernelSize, 268 kernelSize,
270 kernel.get(), 269 kernel.get(),
271 gain, 270 gain,
272 bias, 271 bias,
273 kernelOffset, 272 kernelOffset,
274 tileMode, 273 tileMode,
275 convolveAlpha); 274 convolveAlpha);
276 } 275 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrMatrixConvolutionEffect.h ('k') | src/gpu/effects/GrOvalEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698