Make GrGpuGL release its resources before GrGLInterface is released.

Forward declare GrGLInterface in GrGLDefaultInterface_none file

Review URL: http://codereview.appspot.com/5030049/


git-svn-id: http://skia.googlecode.com/svn/trunk@2278 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2011-09-16 21:18:29 +00:00
parent d4f299e496
commit 15b11df63f
2 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@
* found in the LICENSE file.
*/
struct GrGLinterface;
const GrGLInterface* GrGLDefaultInterface() {
return NULL;

View File

@ -541,6 +541,9 @@ GrGpuGL::GrGpuGL(const GrGLInterface* gl, GrGLBinding glBinding)
}
GrGpuGL::~GrGpuGL() {
// This subclass must do this before the base class destructor runs
// since we will unref the GrGLInterface.
this->releaseResources();
fGL->unref();
}