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

Side by Side Diff: gpu/command_buffer/client/query_tracker.h

Issue 1138463003: A GL Query cache of 1024 items is enough (was 4096). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_
7 7
8 #include <GLES2/gl2.h> 8 #include <GLES2/gl2.h>
9 9
10 #include <deque> 10 #include <deque>
11 #include <list> 11 #include <list>
12 12
13 #include "base/atomicops.h" 13 #include "base/atomicops.h"
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "gles2_impl_export.h" 15 #include "gles2_impl_export.h"
16 #include "gpu/command_buffer/common/gles2_cmd_format.h" 16 #include "gpu/command_buffer/common/gles2_cmd_format.h"
17 17
18 namespace gpu { 18 namespace gpu {
19 19
20 class CommandBufferHelper; 20 class CommandBufferHelper;
21 class MappedMemoryManager; 21 class MappedMemoryManager;
22 22
23 namespace gles2 { 23 namespace gles2 {
24 24
25 class GLES2Implementation; 25 class GLES2Implementation;
26 26
27 // Manages buckets of QuerySync instances in mapped memory. 27 // Manages buckets of QuerySync instances in mapped memory.
28 class GLES2_IMPL_EXPORT QuerySyncManager { 28 class GLES2_IMPL_EXPORT QuerySyncManager {
29 public: 29 public:
30 static const size_t kSyncsPerBucket = 4096; 30 static const size_t kSyncsPerBucket = 1024;
31 31
32 struct Bucket { 32 struct Bucket {
33 explicit Bucket(QuerySync* sync_mem) 33 explicit Bucket(QuerySync* sync_mem)
34 : syncs(sync_mem), 34 : syncs(sync_mem),
35 used_query_count(0) { 35 used_query_count(0) {
36 } 36 }
37 QuerySync* syncs; 37 QuerySync* syncs;
38 unsigned used_query_count; 38 unsigned used_query_count;
39 }; 39 };
40 struct QueryInfo { 40 struct QueryInfo {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 QueryList removed_queries_; 168 QueryList removed_queries_;
169 QuerySyncManager query_sync_manager_; 169 QuerySyncManager query_sync_manager_;
170 170
171 DISALLOW_COPY_AND_ASSIGN(QueryTracker); 171 DISALLOW_COPY_AND_ASSIGN(QueryTracker);
172 }; 172 };
173 173
174 } // namespace gles2 174 } // namespace gles2
175 } // namespace gpu 175 } // namespace gpu
176 176
177 #endif // GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_ 177 #endif // GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698