| 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 <queue> | 10 #include <queue> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 GLenum target_; | 130 GLenum target_; |
| 131 QuerySyncManager::QueryInfo info_; | 131 QuerySyncManager::QueryInfo info_; |
| 132 State state_; | 132 State state_; |
| 133 uint32 submit_count_; | 133 uint32 submit_count_; |
| 134 int32 token_; | 134 int32 token_; |
| 135 bool flushed_; | 135 bool flushed_; |
| 136 uint64 client_begin_time_us_; // Only used for latency query target. | 136 uint64 client_begin_time_us_; // Only used for latency query target. |
| 137 uint32 result_; | 137 uint32 result_; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 QueryTracker(MappedMemoryManager* manager); | 140 explicit QueryTracker(MappedMemoryManager* manager); |
| 141 ~QueryTracker(); | 141 ~QueryTracker(); |
| 142 | 142 |
| 143 Query* CreateQuery(GLuint id, GLenum target); | 143 Query* CreateQuery(GLuint id, GLenum target); |
| 144 Query* GetQuery(GLuint id); | 144 Query* GetQuery(GLuint id); |
| 145 void RemoveQuery(GLuint id, bool context_lost); | 145 void RemoveQuery(GLuint id, bool context_lost); |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 typedef gpu::hash_map<GLuint, Query*> QueryMap; | 148 typedef gpu::hash_map<GLuint, Query*> QueryMap; |
| 149 | 149 |
| 150 QueryMap queries_; | 150 QueryMap queries_; |
| 151 QuerySyncManager query_sync_manager_; | 151 QuerySyncManager query_sync_manager_; |
| 152 | 152 |
| 153 DISALLOW_COPY_AND_ASSIGN(QueryTracker); | 153 DISALLOW_COPY_AND_ASSIGN(QueryTracker); |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace gles2 | 156 } // namespace gles2 |
| 157 } // namespace gpu | 157 } // namespace gpu |
| 158 | 158 |
| 159 #endif // GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_ | 159 #endif // GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_ |
| OLD | NEW |