diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-13 16:31:19 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-13 16:31:19 +0000 |
commit | 73a9694b4ceb67547e5863db5315488e7d5294f7 (patch) | |
tree | a77c83c99014ef91c02b8bc40ce802877b50ae42 /tests | |
parent | 45a412ee365694c61b50f6177382b509d1e2462b (diff) |
Use SkMWRandom in GLPrograms test.
R=jvanverth@google.com
Review URL: https://codereview.appspot.com/7306097
git-svn-id: http://skia.googlecode.com/svn/trunk@7721 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GLProgramsTest.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index ad3d2c650b..d4873cada0 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -20,20 +20,6 @@ #include "SkRandom.h" #include "Test.h" -namespace { - -const GrEffectRef* create_random_effect(SkMWCRandom* random, - GrContext* context, - GrTexture* dummyTextures[]) { - // TODO: Make GrTestFactory use SkMWCRandom and simply pass along param random - SkRandom sk_random; - sk_random.setSeed(random->nextU()); - GrEffectRef* effect = GrEffectTestFactory::CreateStage(&sk_random, context, dummyTextures); - GrAssert(effect); - return effect; -} -} - void GrGLProgram::Desc::setRandom(SkMWCRandom* random, const GrGpuGL* gpu, const GrEffectStage stages[GrDrawState::kNumStages]) { @@ -118,9 +104,10 @@ bool GrGpuGL::programUnitTest(int maxStages) { // enable the stage? if (random.nextBool()) { GrTexture* dummyTextures[] = {dummyTexture1.get(), dummyTexture2.get()}; - SkAutoTUnref<const GrEffectRef> effect(create_random_effect(&random, - getContext(), - dummyTextures)); + SkAutoTUnref<const GrEffectRef> effect(GrEffectTestFactory::CreateStage( + &random, + this->getContext(), + dummyTextures)); stages[s].setEffect(effect.get()); } } |