commit | 15b11df63f7871ec52678dbe2cf76a5721917039 | [log] [tgz] |
---|---|---|
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Fri Sep 16 21:18:29 2011 +0000 |
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | Fri Sep 16 21:18:29 2011 +0000 |
tree | 94cadc3cd58492ee1949c15730448e6ca55ab385 | |
parent | d4f299e496317e94511da6f80c219a47aaafac7b [diff] |
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
diff --git a/gpu/src/GrGLDefaultInterface_none.cpp b/gpu/src/GrGLDefaultInterface_none.cpp index b6308e3..b487d53 100644 --- a/gpu/src/GrGLDefaultInterface_none.cpp +++ b/gpu/src/GrGLDefaultInterface_none.cpp
@@ -6,6 +6,7 @@ * found in the LICENSE file. */ +struct GrGLinterface; const GrGLInterface* GrGLDefaultInterface() { return NULL;
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp index 92d836d..fefc914 100644 --- a/gpu/src/GrGpuGL.cpp +++ b/gpu/src/GrGpuGL.cpp
@@ -541,6 +541,9 @@ } GrGpuGL::~GrGpuGL() { + // This subclass must do this before the base class destructor runs + // since we will unref the GrGLInterface. + this->releaseResources(); fGL->unref(); }