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

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

Issue 1434313002: Make all GrFragmentProcessors GL independent. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/GrDitherEffect.cpp ('k') | src/gpu/effects/GrMatrixConvolutionEffect.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 #ifndef GrMatrixConvolutionEffect_DEFINED 8 #ifndef GrMatrixConvolutionEffect_DEFINED
9 #define GrMatrixConvolutionEffect_DEFINED 9 #define GrMatrixConvolutionEffect_DEFINED
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 GrMatrixConvolutionEffect(GrTexture*, 59 GrMatrixConvolutionEffect(GrTexture*,
60 const SkIRect& bounds, 60 const SkIRect& bounds,
61 const SkISize& kernelSize, 61 const SkISize& kernelSize,
62 const SkScalar* kernel, 62 const SkScalar* kernel,
63 SkScalar gain, 63 SkScalar gain,
64 SkScalar bias, 64 SkScalar bias,
65 const SkIPoint& kernelOffset, 65 const SkIPoint& kernelOffset,
66 GrTextureDomain::Mode tileMode, 66 GrTextureDomain::Mode tileMode,
67 bool convolveAlpha); 67 bool convolveAlpha);
68 68
69 GrGLFragmentProcessor* onCreateGLInstance() const override; 69 GrGLSLFragmentProcessor* onCreateGLInstance() const override;
70 70
71 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov erride; 71 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov erride;
72 72
73 bool onIsEqual(const GrFragmentProcessor&) const override; 73 bool onIsEqual(const GrFragmentProcessor&) const override;
74 74
75 void onComputeInvariantOutput(GrInvariantOutput* inout) const override { 75 void onComputeInvariantOutput(GrInvariantOutput* inout) const override {
76 // TODO: Try to do better? 76 // TODO: Try to do better?
77 inout->mulByUnknownFourComponents(); 77 inout->mulByUnknownFourComponents();
78 } 78 }
79 79
80 SkIRect fBounds; 80 SkIRect fBounds;
81 SkISize fKernelSize; 81 SkISize fKernelSize;
82 float fKernel[MAX_KERNEL_SIZE]; 82 float fKernel[MAX_KERNEL_SIZE];
83 float fGain; 83 float fGain;
84 float fBias; 84 float fBias;
85 float fKernelOffset[2]; 85 float fKernelOffset[2];
86 bool fConvolveAlpha; 86 bool fConvolveAlpha;
87 GrTextureDomain fDomain; 87 GrTextureDomain fDomain;
88 88
89 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 89 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
90 90
91 typedef GrSingleTextureEffect INHERITED; 91 typedef GrSingleTextureEffect INHERITED;
92 }; 92 };
93 93
94 #endif 94 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDitherEffect.cpp ('k') | src/gpu/effects/GrMatrixConvolutionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698