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

Unified Diff: src/gpu/GrDrawingManager.cpp

Issue 1538013002: Add Drawing Manager guards against re-entrant flushes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/GrDrawingManager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawingManager.cpp
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 6e84f22e2cc7e05f98c26c1bbf7152587f2aa313..7aa0fdbe0a281094edff5936373012cc03353c91 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -64,6 +64,11 @@ void GrDrawingManager::reset() {
}
void GrDrawingManager::flush() {
+ if (fFlushing) {
+ return;
+ }
+ fFlushing = true;
+
SkDEBUGCODE(bool result =)
SkTTopoSort<GrDrawTarget, GrDrawTarget::TopoSortTraits>(&fDrawTargets);
SkASSERT(result);
@@ -107,6 +112,7 @@ void GrDrawingManager::flush() {
#endif
fFlushState.reset();
+ fFlushing = false;
}
GrTextContext* GrDrawingManager::textContext(const SkSurfaceProps& props,
« no previous file with comments | « src/gpu/GrDrawingManager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698