| OLD | NEW |
| 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/containers/hash_tables.h" |
| 13 #include "gles2_impl_export.h" | 14 #include "gles2_impl_export.h" |
| 14 #include "gpu/command_buffer/client/hash_tables.h" | |
| 15 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 15 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
| 16 | 16 |
| 17 namespace gpu { | 17 namespace gpu { |
| 18 | 18 |
| 19 class CommandBufferHelper; | 19 class CommandBufferHelper; |
| 20 class MappedMemoryManager; | 20 class MappedMemoryManager; |
| 21 | 21 |
| 22 namespace gles2 { | 22 namespace gles2 { |
| 23 | 23 |
| 24 class GLES2Implementation; | 24 class GLES2Implementation; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 QueryTracker(MappedMemoryManager* manager); | 154 QueryTracker(MappedMemoryManager* manager); |
| 155 ~QueryTracker(); | 155 ~QueryTracker(); |
| 156 | 156 |
| 157 Query* CreateQuery(GLuint id, GLenum target); | 157 Query* CreateQuery(GLuint id, GLenum target); |
| 158 Query* GetQuery(GLuint id); | 158 Query* GetQuery(GLuint id); |
| 159 void RemoveQuery(GLuint id); | 159 void RemoveQuery(GLuint id); |
| 160 void Shrink(); | 160 void Shrink(); |
| 161 void FreeCompletedQueries(); | 161 void FreeCompletedQueries(); |
| 162 | 162 |
| 163 private: | 163 private: |
| 164 typedef gpu::hash_map<GLuint, Query*> QueryMap; | 164 typedef base::hash_map<GLuint, Query*> QueryMap; |
| 165 typedef std::list<Query*> QueryList; | 165 typedef std::list<Query*> QueryList; |
| 166 | 166 |
| 167 QueryMap queries_; | 167 QueryMap queries_; |
| 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_ |
| OLD | NEW |