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

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

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/debug/GrDebugGL.h ('k') | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/debug/GrDebugGL.cpp
diff --git a/src/gpu/gl/debug/GrDebugGL.cpp b/src/gpu/gl/debug/GrDebugGL.cpp
index 03ff36daf2789c8aafcefbcbe7c5d7c6d7a4849e..71607c8b0d02253bbc543ab22ae41f1b5fda22f4 100644
--- a/src/gpu/gl/debug/GrDebugGL.cpp
+++ b/src/gpu/gl/debug/GrDebugGL.cpp
@@ -40,7 +40,8 @@ GrDebugGL::GrDebugGL()
, fRenderBuffer(NULL)
, fProgram(NULL)
, fTexture(NULL)
- , fVertexArray(NULL) {
+ , fVertexArray(NULL)
+ , fAbandoned(false) {
for (int i = 0; i < kDefaultMaxTextureUnits; ++i) {
@@ -204,8 +205,10 @@ void GrDebugGL::useProgram(GrProgramObj *program) {
void GrDebugGL::report() const {
for (int i = 0; i < fObjects.count(); ++i) {
- GrAlwaysAssert(0 == fObjects[i]->getRefCount());
GrAlwaysAssert(0 < fObjects[i]->getHighRefCount());
- GrAlwaysAssert(fObjects[i]->getDeleted());
+ if (!fAbandoned) {
+ GrAlwaysAssert(0 == fObjects[i]->getRefCount());
+ GrAlwaysAssert(fObjects[i]->getDeleted());
+ }
}
}
« no previous file with comments | « src/gpu/gl/debug/GrDebugGL.h ('k') | src/gpu/gl/debug/GrGLCreateDebugInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698