aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGpuGL_unittest.cpp
diff options
context:
space:
mode:
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;
}