| 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_SERVICE_QUERY_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/atomicops.h" | 10 #include "base/atomicops.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 // Returns a target used for the underlying GL extension | 213 // Returns a target used for the underlying GL extension |
| 214 // used to emulate a query. | 214 // used to emulate a query. |
| 215 GLenum AdjustTargetForEmulation(GLenum target); | 215 GLenum AdjustTargetForEmulation(GLenum target); |
| 216 | 216 |
| 217 // Used to validate shared memory and get GL errors. | 217 // Used to validate shared memory and get GL errors. |
| 218 GLES2Decoder* decoder_; | 218 GLES2Decoder* decoder_; |
| 219 | 219 |
| 220 bool use_arb_occlusion_query2_for_occlusion_query_boolean_; | 220 bool use_arb_occlusion_query2_for_occlusion_query_boolean_; |
| 221 bool use_arb_occlusion_query_for_occlusion_query_boolean_; | 221 bool use_arb_occlusion_query_for_occlusion_query_boolean_; |
| 222 bool use_arb_sync_; |
| 222 | 223 |
| 223 // Counts the number of Queries allocated with 'this' as their manager. | 224 // Counts the number of Queries allocated with 'this' as their manager. |
| 224 // Allows checking no Query will outlive this. | 225 // Allows checking no Query will outlive this. |
| 225 unsigned query_count_; | 226 unsigned query_count_; |
| 226 | 227 |
| 227 // Info for each query in the system. | 228 // Info for each query in the system. |
| 228 typedef base::hash_map<GLuint, scoped_refptr<Query> > QueryMap; | 229 typedef base::hash_map<GLuint, scoped_refptr<Query> > QueryMap; |
| 229 QueryMap queries_; | 230 QueryMap queries_; |
| 230 | 231 |
| 231 // Queries waiting for completion. | 232 // Queries waiting for completion. |
| 232 typedef std::deque<scoped_refptr<Query> > QueryQueue; | 233 typedef std::deque<scoped_refptr<Query> > QueryQueue; |
| 233 QueryQueue pending_queries_; | 234 QueryQueue pending_queries_; |
| 234 | 235 |
| 235 // Async pixel transfer queries waiting for completion. | 236 // Async pixel transfer queries waiting for completion. |
| 236 QueryQueue pending_transfer_queries_; | 237 QueryQueue pending_transfer_queries_; |
| 237 | 238 |
| 238 DISALLOW_COPY_AND_ASSIGN(QueryManager); | 239 DISALLOW_COPY_AND_ASSIGN(QueryManager); |
| 239 }; | 240 }; |
| 240 | 241 |
| 241 } // namespace gles2 | 242 } // namespace gles2 |
| 242 } // namespace gpu | 243 } // namespace gpu |
| 243 | 244 |
| 244 #endif // GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ | 245 #endif // GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ |
| OLD | NEW |