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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 1406173003: Loosen requirement that there be only one GrDrawTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment Created 5 years, 2 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/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 98faffca5e8027c8ac9be6d70638f524959cf48c..db637d52b10add9e59421d726cb1bab2d44710a5 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -49,6 +49,15 @@ public:
~GrDrawTarget() override;
+ void makeClosed() {
+ // We only close drawTargets When MDB is enabled. When MDB is disabled there is only
+ // ever one drawTarget and all calls will be funnelled into it.
+#ifdef ENABLE_MDB
+ fClosed = true;
+#endif
+ }
+ bool isClosed() const { return fClosed; }
+
/**
* Empties the draw buffer of any queued up draws.
*/
@@ -235,6 +244,8 @@ private:
bool fFlushing;
int fFirstUnpreparedBatch;
+ bool fClosed;
+
typedef SkRefCnt INHERITED;
};
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698