| Index: gpu/command_buffer/service/query_manager.h
|
| diff --git a/gpu/command_buffer/service/query_manager.h b/gpu/command_buffer/service/query_manager.h
|
| index 322c03d34b0ad46fb43ed26d921975f645c3036e..bf083aaa3633ce50c63bb658be6fb479a301960f 100644
|
| --- a/gpu/command_buffer/service/query_manager.h
|
| +++ b/gpu/command_buffer/service/query_manager.h
|
| @@ -89,11 +89,21 @@ class GPU_EXPORT QueryManager {
|
| submit_count_ = submit_count;
|
| }
|
|
|
| + void UnmarkAsPending() {
|
| + DCHECK(pending_);
|
| + pending_ = false;
|
| + }
|
| +
|
| // Returns false if shared memory for sync is invalid.
|
| bool AddToPendingQueue(uint32 submit_count) {
|
| return manager_->AddPendingQuery(this, submit_count);
|
| }
|
|
|
| + // Returns false if shared memory for sync is invalid.
|
| + bool AddToPendingTransferQueue(uint32 submit_count) {
|
| + return manager_->AddPendingTransferQuery(this, submit_count);
|
| + }
|
| +
|
| void BeginQueryHelper(GLenum target, GLuint id) {
|
| manager_->BeginQueryHelper(target, id);
|
| }
|
| @@ -102,15 +112,15 @@ class GPU_EXPORT QueryManager {
|
| manager_->EndQueryHelper(target);
|
| }
|
|
|
| + uint32 submit_count() const {
|
| + return submit_count_;
|
| + }
|
| +
|
| private:
|
| friend class QueryManager;
|
| friend class QueryManagerTest;
|
| friend class base::RefCounted<Query>;
|
|
|
| - uint32 submit_count() const {
|
| - return submit_count_;
|
| - }
|
| -
|
| // The manager that owns this Query.
|
| QueryManager* manager_;
|
|
|
| @@ -162,6 +172,13 @@ class GPU_EXPORT QueryManager {
|
| // True if there are pending queries.
|
| bool HavePendingQueries();
|
|
|
| + // Processes pending transfer queries. Returns false if any queries are
|
| + // pointing to invalid shared memory.
|
| + bool ProcessPendingTransferQueries();
|
| +
|
| + // True if there are pending transfer queries.
|
| + bool HavePendingTransferQueries();
|
| +
|
| GLES2Decoder* decoder() const {
|
| return decoder_;
|
| }
|
| @@ -179,6 +196,10 @@ class GPU_EXPORT QueryManager {
|
| // Returns false if any query is pointing to invalid shared memory.
|
| bool AddPendingQuery(Query* query, uint32 submit_count);
|
|
|
| + // Adds to queue of transfer queries waiting for completion.
|
| + // Returns false if any query is pointing to invalid shared memory.
|
| + bool AddPendingTransferQuery(Query* query, uint32 submit_count);
|
| +
|
| // Removes a query from the queue of pending queries.
|
| // Returns false if any query is pointing to invalid shared memory.
|
| bool RemovePendingQuery(Query* query);
|
| @@ -205,6 +226,9 @@ class GPU_EXPORT QueryManager {
|
| typedef std::deque<Query::Ref> QueryQueue;
|
| QueryQueue pending_queries_;
|
|
|
| + // Async pixel transfer queries waiting for completion.
|
| + QueryQueue pending_transfer_queries_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(QueryManager);
|
| };
|
|
|
|
|