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

Side by Side Diff: gpu/command_buffer/service/gpu_state_tracer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_GPU_STATE_TRACER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 11
11 namespace gfx { 12 namespace gfx {
12 class Size; 13 class Size;
13 } 14 }
14 15
15 namespace gpu { 16 namespace gpu {
16 namespace gles2 { 17 namespace gles2 {
17 18
18 struct ContextState; 19 struct ContextState;
19 20
20 // Saves GPU state such as framebuffer contents while tracing. 21 // Saves GPU state such as framebuffer contents while tracing.
21 class GPUStateTracer { 22 class GPUStateTracer {
22 public: 23 public:
23 static scoped_ptr<GPUStateTracer> Create(const ContextState* state); 24 static std::unique_ptr<GPUStateTracer> Create(const ContextState* state);
24 ~GPUStateTracer(); 25 ~GPUStateTracer();
25 26
26 // Take a state snapshot with a screenshot of the currently bound framebuffer. 27 // Take a state snapshot with a screenshot of the currently bound framebuffer.
27 void TakeSnapshotWithCurrentFramebuffer(const gfx::Size& size); 28 void TakeSnapshotWithCurrentFramebuffer(const gfx::Size& size);
28 29
29 private: 30 private:
30 explicit GPUStateTracer(const ContextState* state); 31 explicit GPUStateTracer(const ContextState* state);
31 32
32 const ContextState* state_; 33 const ContextState* state_;
33 DISALLOW_COPY_AND_ASSIGN(GPUStateTracer); 34 DISALLOW_COPY_AND_ASSIGN(GPUStateTracer);
34 }; 35 };
35 36
36 } // namespace gles2 37 } // namespace gles2
37 } // namespace gpu 38 } // namespace gpu
38 39
39 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_ 40 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_STATE_TRACER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gpu_service_test.h ('k') | gpu/command_buffer/service/gpu_state_tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698