diff options
Diffstat (limited to 'src/gpu/gl/GrGpuGL.cpp')
-rw-r--r-- | src/gpu/gl/GrGpuGL.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp index 4a63b3322f..21cf3b8884 100644 --- a/src/gpu/gl/GrGpuGL.cpp +++ b/src/gpu/gl/GrGpuGL.cpp @@ -175,7 +175,6 @@ GrGpuGL::GrGpuGL(const GrGLContextInfo& ctxInfo) : fGLContextInfo(ctxInfo) { this->initCaps(); - fProgramData = NULL; fProgramCache = SkNEW_ARGS(ProgramCache, (this->glContextInfo())); fLastSuccessfulStencilFmtIdx = 0; @@ -186,16 +185,14 @@ GrGpuGL::GrGpuGL(const GrGLContextInfo& ctxInfo) : fGLContextInfo(ctxInfo) { } 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(); |