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

Unified Diff: gpu/command_buffer/client/query_tracker.h

Issue 1129253006: std::bitset solution for GL Query cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Different DCHECKs Created 5 years, 7 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
« no previous file with comments | « gpu/command_buffer/client/client_test_helper.h ('k') | gpu/command_buffer/client/query_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/query_tracker.h
diff --git a/gpu/command_buffer/client/query_tracker.h b/gpu/command_buffer/client/query_tracker.h
index dda20d78a82765d4c9159c9432422314299f086f..e83e041a712b926177ad6be0e2c2d39be79f851d 100644
--- a/gpu/command_buffer/client/query_tracker.h
+++ b/gpu/command_buffer/client/query_tracker.h
@@ -7,9 +7,9 @@
#include <GLES2/gl2.h>
+#include <bitset>
#include <deque>
#include <list>
-#include <vector>
#include "base/atomicops.h"
#include "base/containers/hash_tables.h"
@@ -28,7 +28,7 @@ class GLES2Implementation;
// Manages buckets of QuerySync instances in mapped memory.
class GLES2_IMPL_EXPORT QuerySyncManager {
public:
- static const size_t kSyncsPerBucket = 1024;
+ static const size_t kSyncsPerBucket = 256;
struct Bucket {
Bucket(QuerySync* sync_mem, int32 shm_id, uint32 shm_offset);
@@ -36,7 +36,7 @@ class GLES2_IMPL_EXPORT QuerySyncManager {
QuerySync* syncs;
int32 shm_id;
uint32 base_shm_offset;
- std::vector<unsigned short> free_queries;
+ std::bitset<kSyncsPerBucket> in_use_queries;
};
struct QueryInfo {
QueryInfo(Bucket* bucket, int32 id, uint32 offset, QuerySync* sync_mem)
« no previous file with comments | « gpu/command_buffer/client/client_test_helper.h ('k') | gpu/command_buffer/client/query_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698