revert 8265-8264 (broke build)
git-svn-id: http://skia.googlecode.com/svn/trunk@8268 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index aeb7ecc..d12aeb5 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -15,7 +15,6 @@
#include "gl/GrGpuGL.h"
#include "GrBackendEffectFactory.h"
#include "GrContextFactory.h"
-#include "GrDrawEffect.h"
#include "effects/GrConfigConversionEffect.h"
#include "SkRandom.h"
@@ -58,18 +57,16 @@
fDualSrcOutput = kNone_DualSrcOutput;
}
- // use separate tex coords?
- if (random->nextBool()) {
- fAttribBindings |= GrDrawState::kLocalCoords_AttribBindingsBit;
- }
-
+ bool useOnce = false;
for (int s = 0; s < GrDrawState::kNumStages; ++s) {
if (NULL != stages[s].getEffect()) {
const GrBackendEffectFactory& factory = (*stages[s].getEffect())->getFactory();
- bool explicitLocalCoords = (fAttribBindings &
- GrDrawState::kLocalCoords_AttribBindingsBit);
- GrDrawEffect drawEffect(stages[s], explicitLocalCoords);
- fEffectKeys[s] = factory.glEffectKey(drawEffect, gpu->glCaps());
+ fEffectKeys[s] = factory.glEffectKey(stages[s], gpu->glCaps());
+ // use separate tex coords?
+ if (!useOnce && random->nextBool()) {
+ fAttribBindings |= GrDrawState::ExplicitTexCoordAttribBindingsBit(s);
+ useOnce = true;
+ }
}
}
@@ -88,8 +85,8 @@
fEdgeAttributeIndex = attributeIndex;
++attributeIndex;
}
- if (fAttribBindings & GrDrawState::kLocalCoords_AttribBindingsBit) {
- fLocalCoordsAttributeIndex = attributeIndex;
+ if (GrDrawState::AttributesBindExplicitTexCoords(fAttribBindings)) {
+ fTexCoordAttributeIndex = attributeIndex;
++attributeIndex;
}
}