diff options
author | 2015-10-16 09:07:06 -0700 | |
---|---|---|
committer | 2015-10-16 09:07:06 -0700 | |
commit | a106c627532ad669cf7d879955ae8ea6a53233c1 (patch) | |
tree | efc00396b82cb530b9069c084c6173e69b75b20b /src/gpu/GrDrawTarget.h | |
parent | 26ad22ab61539e3d3b6bc5e0da8dcebbd52a53de (diff) |
Loosen requirement that there be only one GrDrawTarget
BUG=skia:4094
Review URL: https://codereview.chromium.org/1406173003
Diffstat (limited to 'src/gpu/GrDrawTarget.h')
-rw-r--r-- | src/gpu/GrDrawTarget.h | 11 |
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; }; |