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 d77982b897fc161867a23c50ef3013b91e5a3d73..59ccbb70a626b1b1c36399e7643f81758a2789ae 100644 |
--- a/gpu/command_buffer/service/query_manager.h |
+++ b/gpu/command_buffer/service/query_manager.h |
@@ -26,7 +26,7 @@ class FeatureInfo; |
// This class keeps track of the queries and their state |
// As Queries are not shared there is one QueryManager per context. |
-class GPU_EXPORT QueryManager { |
+class GPU_EXPORT QueryManager : public base::SupportsWeakPtr<QueryManager> { |
public: |
class GPU_EXPORT Query : public base::RefCounted<Query> { |
public: |
@@ -57,6 +57,14 @@ class GPU_EXPORT QueryManager { |
return shm_offset_; |
} |
+ void set_serial(uint32 serial) { |
+ serial_ = serial; |
+ } |
+ |
+ uint32 serial() const { |
+ return serial_; |
+ } |
+ |
// Returns false if shared memory for sync is invalid. |
virtual bool Begin() = 0; |
@@ -143,6 +151,8 @@ class GPU_EXPORT QueryManager { |
// True if deleted. |
bool deleted_; |
+ uint32 serial_; |
+ |
// List of callbacks to run when result is available. |
std::vector<base::Closure> callbacks_; |
}; |