diff options
author | bsalomon <bsalomon@google.com> | 2014-08-21 13:02:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-21 13:02:13 -0700 |
commit | c8dc1f74b6cdda9a43a638292a608c59c1d72d80 (patch) | |
tree | 3a9aa5cba189d6d342520bde36f94abb3570d5c6 /src/gpu/gl/GrGpuGL.cpp | |
parent | 78fc1dbed0216f3c85445b100331645a187c424f (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.cpp | 12 |
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(); + } } /////////////////////////////////////////////////////////////////////////////// |