| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| 11 #include <memory> |
| 11 #include <vector> | 12 #include <vector> |
| 13 |
| 12 #include "base/atomicops.h" | 14 #include "base/atomicops.h" |
| 13 #include "base/containers/hash_tables.h" | 15 #include "base/containers/hash_tables.h" |
| 14 #include "base/logging.h" | 16 #include "base/logging.h" |
| 15 #include "base/macros.h" | 17 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/scoped_ptr.h" | |
| 18 #include "gpu/command_buffer/service/feature_info.h" | 19 #include "gpu/command_buffer/service/feature_info.h" |
| 19 #include "gpu/gpu_export.h" | 20 #include "gpu/gpu_export.h" |
| 20 | 21 |
| 21 namespace gfx { | 22 namespace gfx { |
| 22 class GPUTimer; | 23 class GPUTimer; |
| 23 class GPUTimingClient; | 24 class GPUTimingClient; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace gpu { | 27 namespace gpu { |
| 27 | 28 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // True if there are pending transfer queries. | 255 // True if there are pending transfer queries. |
| 255 bool HavePendingTransferQueries(); | 256 bool HavePendingTransferQueries(); |
| 256 | 257 |
| 257 // Do any updates we need to do when the frame has begun. | 258 // Do any updates we need to do when the frame has begun. |
| 258 void ProcessFrameBeginUpdates(); | 259 void ProcessFrameBeginUpdates(); |
| 259 | 260 |
| 260 GLES2Decoder* decoder() const { | 261 GLES2Decoder* decoder() const { |
| 261 return decoder_; | 262 return decoder_; |
| 262 } | 263 } |
| 263 | 264 |
| 264 scoped_ptr<gfx::GPUTimer> CreateGPUTimer(bool elapsed_time); | 265 std::unique_ptr<gfx::GPUTimer> CreateGPUTimer(bool elapsed_time); |
| 265 bool GPUTimingAvailable(); | 266 bool GPUTimingAvailable(); |
| 266 | 267 |
| 267 void GenQueries(GLsizei n, const GLuint* queries); | 268 void GenQueries(GLsizei n, const GLuint* queries); |
| 268 bool IsValidQuery(GLuint id); | 269 bool IsValidQuery(GLuint id); |
| 269 | 270 |
| 270 private: | 271 private: |
| 271 void StartTracking(Query* query); | 272 void StartTracking(Query* query); |
| 272 void StopTracking(Query* query); | 273 void StopTracking(Query* query); |
| 273 | 274 |
| 274 // Wrappers for BeginQueryARB and EndQueryARB to hide differences between | 275 // Wrappers for BeginQueryARB and EndQueryARB to hide differences between |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 340 |
| 340 scoped_refptr<gfx::GPUTimingClient> gpu_timing_client_; | 341 scoped_refptr<gfx::GPUTimingClient> gpu_timing_client_; |
| 341 | 342 |
| 342 DISALLOW_COPY_AND_ASSIGN(QueryManager); | 343 DISALLOW_COPY_AND_ASSIGN(QueryManager); |
| 343 }; | 344 }; |
| 344 | 345 |
| 345 } // namespace gles2 | 346 } // namespace gles2 |
| 346 } // namespace gpu | 347 } // namespace gpu |
| 347 | 348 |
| 348 #endif // GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ | 349 #endif // GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ |
| OLD | NEW |