aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGpuGL.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-08-21 13:02:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-21 13:02:13 -0700
commitc8dc1f74b6cdda9a43a638292a608c59c1d72d80 (patch)
tree3a9aa5cba189d6d342520bde36f94abb3570d5c6 /src/gpu/gl/GrGpuGL.cpp
parent78fc1dbed0216f3c85445b100331645a187c424f (diff)
Add GrResourceCache2.
Currently it just replaces GrGpu as the owner of the linked list of resources. Committed: https://skia.googlesource.com/skia/+/94ce9ac8624dbb45656b8f5c992fad9c9ff3ee5f R=mtklein@google.com, robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/481443002
Diffstat (limited to 'src/gpu/gl/GrGpuGL.cpp')
-rw-r--r--src/gpu/gl/GrGpuGL.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index e7daa6b659..418f591301 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -164,9 +164,15 @@ GrGpuGL::~GrGpuGL() {
// This must be called by before the GrDrawTarget destructor
this->releaseGeometry();
- // This subclass must do this before the base class destructor runs
- // since we will unref the GrGLInterface.
- this->releaseResources();
+}
+
+void GrGpuGL::contextAbandonded() {
+ INHERITED::contextAbandonded();
+ fProgramCache->abandon();
+ fHWProgramID = 0;
+ if (this->glCaps().pathRenderingSupport()) {
+ this->glPathRendering()->abandonGpuResources();
+ }
}
///////////////////////////////////////////////////////////////////////////////