Index: src/gpu/gl/GrGLProgramDesc.cpp |
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp |
index d7ba287cfa623bc9050cd3b93ccdba686c5ff302..4056c77808750f97620e30f2e1ab0119a6edfa71 100644 |
--- a/src/gpu/gl/GrGLProgramDesc.cpp |
+++ b/src/gpu/gl/GrGLProgramDesc.cpp |
@@ -8,7 +8,6 @@ |
#include "gl/builders/GrGLProgramBuilder.h" |
#include "GrGLProgramDesc.h" |
#include "GrBackendEffectFactory.h" |
-#include "GrDrawEffect.h" |
#include "GrEffect.h" |
#include "GrGpuGL.h" |
@@ -23,24 +22,27 @@ bool GrGLProgramDesc::GetEffectKeyAndUpdateStats(const GrEffectStage& stage, |
bool* setTrueIfReadsPos, |
bool* setTrueIfRequiresVertexShader) { |
const GrBackendEffectFactory& factory = stage.getEffect()->getFactory(); |
- GrDrawEffect drawEffect(stage, useExplicitLocalCoords); |
- if (stage.getEffect()->willReadDstColor()) { |
+ const GrEffect& effect = *stage.getEffect(); |
+ if (effect.willReadDstColor()) { |
*setTrueIfReadsDst = true; |
} |
- if (stage.getEffect()->willReadFragmentPosition()) { |
+ if (effect.willReadFragmentPosition()) { |
*setTrueIfReadsPos = true; |
} |
- if (stage.getEffect()->requiresVertexShader()) { |
+ if (effect.requiresVertexShader()) { |
*setTrueIfRequiresVertexShader = true; |
} |
- factory.getGLEffectKey(drawEffect, caps, b); |
+ factory.getGLEffectKey(effect, caps, b); |
size_t size = b->size(); |
if (size > SK_MaxU16) { |
*effectKeySize = 0; // suppresses a warning. |
return false; |
} |
*effectKeySize = SkToU16(size); |
- if (!GrGLProgramEffects::GenEffectMetaKey(drawEffect, caps, b)) { |
+ if (!GrGLProgramEffects::GenEffectMetaKey(stage, |
+ useExplicitLocalCoords, |
+ caps, |
+ b)) { |
return false; |
} |
return true; |