diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-29 19:51:22 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-29 19:51:22 +0000 |
commit | 2eaaefd7e6a58339b3f93333f1e9cc92252cc303 (patch) | |
tree | f65a31a9b3bc70909ceb311ebad684c2bf445868 /src/effects/SkLightingImageFilter.cpp | |
parent | 484ee2a5fe47c204d9dda6acba54f9789d1cf69f (diff) |
Pass GrCustomStage to key-generation functions and emitCode().
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6819046
git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6182 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/SkLightingImageFilter.cpp')
-rw-r--r-- | src/effects/SkLightingImageFilter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp index e25ab9fd3d..2f403c13f4 100644 --- a/src/effects/SkLightingImageFilter.cpp +++ b/src/effects/SkLightingImageFilter.cpp @@ -14,10 +14,10 @@ #include "SkTypes.h" #if SK_SUPPORT_GPU -#include "GrBackendEffectFactory.h" #include "effects/GrSingleTextureEffect.h" #include "gl/GrGLEffect.h" #include "GrEffect.h" +#include "GrTBackendEffectFactory.h" class GrGLDiffuseLightingEffect; class GrGLSpecularLightingEffect; @@ -949,14 +949,14 @@ public: virtual ~GrGLLightingEffect(); virtual void emitCode(GrGLShaderBuilder*, - const GrEffect&, + const GrEffectStage&, EffectKey, const char* vertexCoords, const char* outputColor, const char* inputColor, const TextureSamplerArray&) SK_OVERRIDE; - static inline EffectKey GenKey(const GrEffect& s, const GrGLCaps& caps); + static inline EffectKey GenKey(const GrEffectStage&, const GrGLCaps&); /** * Subclasses of GrGLLightingEffect must call INHERITED::setData(); @@ -1072,7 +1072,7 @@ GrGLLightingEffect::~GrGLLightingEffect() { } void GrGLLightingEffect::emitCode(GrGLShaderBuilder* builder, - const GrEffect&, + const GrEffectStage&, EffectKey, const char* vertexCoords, const char* outputColor, @@ -1167,9 +1167,9 @@ void GrGLLightingEffect::emitCode(GrGLShaderBuilder* builder, GrGLSLMulVarBy4f(code, 2, outputColor, inputColor); } -GrGLEffect::EffectKey GrGLLightingEffect::GenKey(const GrEffect& s, - const GrGLCaps& caps) { - return static_cast<const GrLightingEffect&>(s).light()->type(); +GrGLEffect::EffectKey GrGLLightingEffect::GenKey(const GrEffectStage& s, + const GrGLCaps& caps) { + return static_cast<const GrLightingEffect&>(*s.getEffect()).light()->type(); } void GrGLLightingEffect::setData(const GrGLUniformManager& uman, const GrEffectStage& stage) { |