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

Side by Side Diff: gpu/command_buffer/service/query_manager.h

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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
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_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
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
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_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_manager_unittest.cc ('k') | gpu/command_buffer/service/query_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698