aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGpuGL_unittest.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-16 17:36:28 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-16 17:36:28 +0000
commit9ba4fa6f0fb8ef496d81ccac36e780aa806fea83 (patch)
tree0b99ab65bf1284389b5deff20bf78047a79eeb0e /src/gpu/gl/GrGpuGL_unittest.cpp
parenta2333d970329e8fffb7347f758f8c421452fe858 (diff)
Remove GrGLProgram::CachedData, make GrGLProgram represent the program
Review URL: http://codereview.appspot.com/6409043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4627 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/GrGpuGL_unittest.cpp')
-rw-r--r--src/gpu/gl/GrGpuGL_unittest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGpuGL_unittest.cpp b/src/gpu/gl/GrGpuGL_unittest.cpp
index 004013a55a..9dd3e77178 100644
--- a/src/gpu/gl/GrGpuGL_unittest.cpp
+++ b/src/gpu/gl/GrGpuGL_unittest.cpp
@@ -231,8 +231,6 @@ bool GrGpuGL::programUnitTest() {
StageDesc::kSmearAlpha_InConfigFlag,
StageDesc::kSmearRed_InConfigFlag,
};
- GrGLProgram program;
- ProgramDesc& pdesc = program.fProgramDesc;
static const int NUM_TESTS = 512;
@@ -247,6 +245,7 @@ bool GrGpuGL::programUnitTest() {
}
#endif
+ ProgramDesc pdesc;
pdesc.fVertexLayout = 0;
pdesc.fEmitsPointSize = random.nextF() > .5f;
pdesc.fColorInput = random_int(&random, ProgramDesc::kColorInputCnt);
@@ -317,14 +316,15 @@ bool GrGpuGL::programUnitTest() {
}
}
}
- CachedData cachedData;
GR_STATIC_ASSERT(sizeof(customStages) ==
GrDrawState::kNumStages * sizeof(GrCustomStage*));
GrCustomStage** stages = reinterpret_cast<GrCustomStage**>(&customStages);
- if (!program.genProgram(this->glContextInfo(), stages, &cachedData)) {
+ SkAutoTUnref<GrGLProgram> program(SkNEW(GrGLProgram));
+
+ if (!program->genProgram(this->glContextInfo(), pdesc, stages)) {
return false;
}
- DeleteProgram(this->glInterface(), &cachedData);
+ DeleteProgram(this->glInterface(), program);
}
return true;
}