aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-05 16:36:02 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-05 16:36:02 +0000
commitdbe49f735484f8862e378b63d0a074a301093dd0 (patch)
tree1508f66f4b524f176fe0d94b9cd0ccd1f5b549a6 /tests
parent4187a2fc71e9f72401e5314a1dca41a556096c51 (diff)
Remove default texture coords / texture matrix
Review URL: https://codereview.appspot.com/6775100 git-svn-id: http://skia.googlecode.com/svn/trunk@6293 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/GLProgramsTest.cpp30
1 files changed, 7 insertions, 23 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 56dbea4eda..a14c95cdba 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -31,8 +31,6 @@ bool random_bool(GrRandom* r) {
return r->nextF() > .5f;
}
-typedef GrGLProgram::StageDesc StageDesc;
-
const GrEffect* create_random_effect(GrRandom* random,
GrContext* context,
GrTexture* dummyTextures[]) {
@@ -59,13 +57,6 @@ bool GrGpuGL::programUnitTest() {
dummyDesc.fHeight = 22;
SkAutoTUnref<GrTexture> dummyTexture2(this->createTexture(dummyDesc, NULL, 0));
- // GrGLSLGeneration glslGeneration =
- GrGetGLSLGeneration(this->glBinding(), this->glInterface());
- static const int STAGE_OPTS[] = {
- 0,
- StageDesc::kNoPerspective_OptFlagBit,
- };
-
static const int NUM_TESTS = 512;
GrRandom random;
@@ -118,7 +109,6 @@ bool GrGpuGL::programUnitTest() {
GrEffectStage stages[GrDrawState::kNumStages];
for (int s = 0; s < GrDrawState::kNumStages; ++s) {
- StageDesc& stageDesc = pdesc.fStages[s];
// enable the stage?
if (random_bool(&random)) {
// use separate tex coords?
@@ -126,24 +116,18 @@ bool GrGpuGL::programUnitTest() {
int t = random_int(&random, GrDrawState::kMaxTexCoords);
pdesc.fVertexLayout |= StageTexCoordVertexLayoutBit(s, t);
}
- stageDesc.setEnabled(true);
- }
- // use text-formatted verts?
- if (random_bool(&random)) {
- pdesc.fVertexLayout |= kTextFormat_VertexLayoutBit;
- }
-
- stageDesc.fEffectKey = 0;
- stageDesc.fOptFlags |= STAGE_OPTS[random_int(&random, GR_ARRAY_COUNT(STAGE_OPTS))];
+ // use text-formatted verts?
+ if (random_bool(&random)) {
+ pdesc.fVertexLayout |= kTextFormat_VertexLayoutBit;
+ }
- if (stageDesc.isEnabled()) {
GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()};
SkAutoTUnref<const GrEffect> effect(create_random_effect(&random,
- getContext(),
- dummyTextures));
+ getContext(),
+ dummyTextures));
stages[s].setEffect(effect.get());
if (NULL != stages[s].getEffect()) {
- stageDesc.fEffectKey =
+ pdesc.fEffectKeys[s] =
stages[s].getEffect()->getFactory().glEffectKey(stages[s], this->glCaps());
}
}