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

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

Issue 9836098: Move gpu hash_tables and atomicops stuff (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add hash tables to gyp Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/client/hash_tables.h ('k') | gpu/command_buffer/client/query_tracker.cc » ('j') | 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 <queue> 10 #include <queue>
11 #include "../../gpu_export.h" 11 #include "../../gpu_export.h"
12 #if defined(__native_client__) 12 #include "../client/hash_tables.h"
13 #include <tr1/unordered_map>
14 #else
15 #include "base/hash_tables.h"
16 #endif
17 #include "../common/gles2_cmd_format.h" 13 #include "../common/gles2_cmd_format.h"
18 14
19 namespace gpu { 15 namespace gpu {
20 16
21 class CommandBufferHelper; 17 class CommandBufferHelper;
22 class MappedMemoryManager; 18 class MappedMemoryManager;
23 19
24 namespace gles2 { 20 namespace gles2 {
25 21
26 // Manages buckets of QuerySync instances in mapped memory. 22 // Manages buckets of QuerySync instances in mapped memory.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 }; 141 };
146 142
147 QueryTracker(MappedMemoryManager* manager); 143 QueryTracker(MappedMemoryManager* manager);
148 ~QueryTracker(); 144 ~QueryTracker();
149 145
150 Query* CreateQuery(GLuint id, GLenum target); 146 Query* CreateQuery(GLuint id, GLenum target);
151 Query* GetQuery(GLuint id); 147 Query* GetQuery(GLuint id);
152 void RemoveQuery(GLuint id); 148 void RemoveQuery(GLuint id);
153 149
154 private: 150 private:
155 #if defined(__native_client__) 151 typedef gpu::hash_map<GLuint, Query*> QueryMap;
156 typedef std::tr1::unordered_map<GLuint, Query*> QueryMap;
157 #else
158 typedef base::hash_map<GLuint, Query*> QueryMap;
159 #endif
160 152
161 QueryMap queries_; 153 QueryMap queries_;
162 QuerySyncManager query_sync_manager_; 154 QuerySyncManager query_sync_manager_;
163 155
164 DISALLOW_COPY_AND_ASSIGN(QueryTracker); 156 DISALLOW_COPY_AND_ASSIGN(QueryTracker);
165 }; 157 };
166 158
167 } // namespace gles2 159 } // namespace gles2
168 } // namespace gpu 160 } // namespace gpu
169 161
170 #endif // GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_ 162 #endif // GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/hash_tables.h ('k') | gpu/command_buffer/client/query_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698