Index: src/gpu/GrDrawTarget.h |
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h |
index 0c2b568da418450eee64c6e6731207799d0383e2..9501d96301bf015f545dce56db3d8dbec215c5c5 100644 |
--- a/src/gpu/GrDrawTarget.h |
+++ b/src/gpu/GrDrawTarget.h |
@@ -621,6 +621,23 @@ public: |
GrDrawTarget* fTarget; |
}; |
+ /////////////////////////////////////////////////////////////////////////// |
+ // Draw execution tracking (for font atlases and other resources) |
+ class DrawToken { |
+ public: |
+ DrawToken(GrDrawTarget* drawTarget, uint32_t drawID) : |
+ fDrawTarget(drawTarget), fDrawID(drawID) {} |
+ |
+ bool isIssued() { return NULL != fDrawTarget && fDrawTarget->isIssued(fDrawID); } |
+ |
+ private: |
+ GrDrawTarget* fDrawTarget; |
+ uint32_t fDrawID; // this may wrap, but we're doing direct comparison |
+ // so that should be okay |
+ }; |
+ |
+ virtual DrawToken getCurrentDrawToken() { return DrawToken(this, 0); } |
+ |
protected: |
enum GeometrySrcType { |
@@ -839,6 +856,9 @@ private: |
// but couldn't be made. Otherwise, returns true. |
bool setupDstReadIfNecessary(DrawInfo* info); |
+ // Check to see if this set of draw commands has been sent out |
+ virtual bool isIssued(uint32_t drawID) { return true; } |
+ |
enum { |
kPreallocGeoSrcStateStackCnt = 4, |
}; |