diff options
| author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-20 17:47:16 +0000 |
|---|---|---|
| committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-20 17:47:16 +0000 |
| commit | 67e7cde5c5e59a8f1de7ee28276b8193ecb2bc7f (patch) | |
| tree | fbb2c63213570deb6062b3eb8e9ba1a13c0431d4 /tests/GLProgramsTest.cpp | |
| parent | 113994051b41366a7b25851d05cd56e89866a33b (diff) | |
revert 8265-8264 (broke build)
git-svn-id: http://skia.googlecode.com/svn/trunk@8268 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/GLProgramsTest.cpp')
| -rw-r--r-- | tests/GLProgramsTest.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index aeb7ecc11e..d12aeb57dd 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 @@ void GrGLProgram::Desc::setRandom(SkMWCRandom* random, 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 @@ void GrGLProgram::Desc::setRandom(SkMWCRandom* random, fEdgeAttributeIndex = attributeIndex; ++attributeIndex; } - if (fAttribBindings & GrDrawState::kLocalCoords_AttribBindingsBit) { - fLocalCoordsAttributeIndex = attributeIndex; + if (GrDrawState::AttributesBindExplicitTexCoords(fAttribBindings)) { + fTexCoordAttributeIndex = attributeIndex; ++attributeIndex; } } |
