Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(671)

Unified Diff: src/gpu/gl/GrGpuGL.cpp

Issue 481443002: Add GrResourceCache2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove removeHead Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 7131cfa1ebbf6afd8e46b32a8f0651fa85d9407f..b975fd1871df589b558e6cd85a57ec67fa41b8b4 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -182,9 +182,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()) {
+ fPathRendering->abandonGpuResources();
+ }
}
///////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698