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

Unified Diff: src/gpu/gl/debug/GrDebugGL.h

Issue 422323002: Some fixes around GrContext::abandonContext: (Closed) Base URL: https://skia.googlesource.com/skia.git@abandon
Patch Set: Address comments Created 6 years, 5 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
« no previous file with comments | « src/gpu/gl/SkGLContextHelper.cpp ('k') | src/gpu/gl/debug/GrDebugGL.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/debug/GrDebugGL.h
diff --git a/src/gpu/gl/debug/GrDebugGL.h b/src/gpu/gl/debug/GrDebugGL.h
index ad6edffdf58a8bc8618af6e41591bd10e67267a4..9192725d1d454951757ec5831d2107420186dab1 100644
--- a/src/gpu/gl/debug/GrDebugGL.h
+++ b/src/gpu/gl/debug/GrDebugGL.h
@@ -114,6 +114,11 @@ public:
}
}
+ static void abandon() {
+ SkASSERT(gStaticRefCount > 0);
+ gObj->fAbandoned = true;
+ }
+
protected:
private:
@@ -132,6 +137,8 @@ private:
GrTextureUnitObj *fTextureUnits[kDefaultMaxTextureUnits];
GrVertexArrayObj *fVertexArray;
+ bool fAbandoned;
+
typedef GrFakeRefObj *(*Create)();
static Create gFactoryFunc[kObjTypeCount];
« no previous file with comments | « src/gpu/gl/SkGLContextHelper.cpp ('k') | src/gpu/gl/debug/GrDebugGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698