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
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 4a63b33..21cf3b8 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -175,7 +175,6 @@
this->initCaps();
- fProgramData = NULL;
fProgramCache = SkNEW_ARGS(ProgramCache, (this->glContextInfo()));
fLastSuccessfulStencilFmtIdx = 0;
@@ -186,16 +185,14 @@
}
GrGpuGL::~GrGpuGL() {
- if (fProgramData && 0 != fHWProgramID) {
+ if (0 != fHWProgramID) {
// detach the current program so there is no confusion on OpenGL's part
// that we want it to be deleted
- GrAssert(fHWProgramID == fProgramData->fProgramID);
+ GrAssert(fHWProgramID == fCurrentProgram->fProgramID);
GL_CALL(UseProgram(0));
}
delete fProgramCache;
- fProgramCache = NULL;
- fProgramData = NULL;
// This must be called by before the GrDrawTarget destructor
this->releaseGeometry();