diff options
author | 2012-08-02 15:15:16 +0000 | |
---|---|---|
committer | 2012-08-02 15:15:16 +0000 | |
commit | a5e65ec434fed44dc616e4f64950b835b541181b (patch) | |
tree | ffe3592179c7c3ce78db8e5e485c641900042015 /src/gpu/effects/GrConvolutionEffect.cpp | |
parent | eb7ad4a8b9c67743d6aa4e71b82e32f4cf1c8a9f (diff) |
Introduction of set of functions to manage generation of texture fetch shader code.
A new set of routines have been added to GrGLShaderBuilder to emit texture fetches, taking into consideration the format of the texture to be accessed, and the channel swizzle.
Review URL: https://codereview.appspot.com/6446072
git-svn-id: http://skia.googlecode.com/svn/trunk@4919 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/effects/GrConvolutionEffect.cpp')
-rw-r--r-- | src/gpu/effects/GrConvolutionEffect.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp index 6af891b098..5cce800b51 100644 --- a/src/gpu/effects/GrConvolutionEffect.cpp +++ b/src/gpu/effects/GrConvolutionEffect.cpp @@ -33,7 +33,7 @@ public: const GrRenderTarget*, int stageNum) SK_OVERRIDE; - static inline StageKey GenKey(const GrCustomStage&); + static inline StageKey GenKey(const GrCustomStage&, const GrGLCaps&); private: int width() const { return Gr1DKernelEffect::WidthFromRadius(fRadius); } @@ -125,8 +125,8 @@ void GrGLConvolutionEffect::setData(const GrGLUniformManager& uman, uman.set1fv(fKernelUni, 0, this->width(), conv.kernel()); } -GrGLProgramStage::StageKey GrGLConvolutionEffect::GenKey( - const GrCustomStage& s) { +GrGLProgramStage::StageKey GrGLConvolutionEffect::GenKey(const GrCustomStage& s, + const GrGLCaps& caps) { return static_cast<const GrConvolutionEffect&>(s).radius(); } @@ -185,4 +185,3 @@ bool GrConvolutionEffect::isEqual(const GrCustomStage& sBase) const { this->direction() == s.direction() && 0 == memcmp(fKernel, s.fKernel, this->width() * sizeof(float))); } - |