Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: gpu/command_buffer/service/query_manager.h

Issue 116863003: gpu: Reuse transfer buffers more aggresively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: [WIP] gpu: Reuse transfer buffers more aggresively Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;
};

Powered by Google App Engine
This is Rietveld 408576698