aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawTarget.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-10-16 09:07:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-16 09:07:06 -0700
commita106c627532ad669cf7d879955ae8ea6a53233c1 (patch)
treeefc00396b82cb530b9069c084c6173e69b75b20b /src/gpu/GrDrawTarget.h
parent26ad22ab61539e3d3b6bc5e0da8dcebbd52a53de (diff)
Loosen requirement that there be only one GrDrawTarget
Diffstat (limited to 'src/gpu/GrDrawTarget.h')
-rw-r--r--src/gpu/GrDrawTarget.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 98faffca5e..db637d52b1 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;
};