diff options
| author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-12 12:26:08 +0000 |
|---|---|---|
| committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-12 12:26:08 +0000 |
| commit | ff6ea2663f76aa85ec55ddd0f00ca7906f1bc4e3 (patch) | |
| tree | 54941da56d3d90540bb21bfab8ca11f0504951e9 /tests/GLProgramsTest.cpp | |
| parent | 2e71f1619d9a2c51c1292e618f42a56ad2da1de8 (diff) | |
Add GrEllipseEdgeEffect.
Adds the effect that replaces the old oval rendering code. Also hooks in code to set attribute names and indices for effects.
Author: jvanverth@google.com
Review URL: https://chromiumcodereview.appspot.com/12462008
git-svn-id: http://skia.googlecode.com/svn/trunk@8092 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/GLProgramsTest.cpp')
| -rw-r--r-- | tests/GLProgramsTest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 45c5f2d162..b56c788513 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -121,6 +121,8 @@ bool GrGpuGL::programUnitTest(int maxStages) { GrGLProgram::Desc pdesc; GrEffectStage stages[GrDrawState::kNumStages]; + int currAttribIndex = GrDrawState::kAttribIndexCount; + int attribIndices[2]; for (int s = 0; s < maxStages; ++s) { // enable the stage? if (random.nextBool()) { @@ -129,7 +131,10 @@ bool GrGpuGL::programUnitTest(int maxStages) { &random, this->getContext(), dummyTextures)); - stages[s].setEffect(effect.get()); + for (int i = 0; i < effect.get()->get()->numVertexAttribs(); ++i) { + attribIndices[i] = currAttribIndex++; + } + stages[s].setEffect(effect.get(), attribIndices); } } pdesc.setRandom(&random, this, stages); |
