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

Side by Side Diff: components/mus/gles2/command_buffer_driver.h

Issue 1906623003: Convert //components/mus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « components/mus/demo/mus_demo.cc ('k') | components/mus/gles2/command_buffer_driver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ 5 #ifndef COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_
6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ 6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/callback.h" 12 #include "base/callback.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "base/single_thread_task_runner.h" 15 #include "base/single_thread_task_runner.h"
15 #include "base/threading/non_thread_safe.h" 16 #include "base/threading/non_thread_safe.h"
16 #include "base/time/time.h" 17 #include "base/time/time.h"
17 #include "gpu/command_buffer/common/capabilities.h" 18 #include "gpu/command_buffer/common/capabilities.h"
18 #include "gpu/command_buffer/common/command_buffer.h" 19 #include "gpu/command_buffer/common/command_buffer.h"
19 #include "gpu/command_buffer/common/command_buffer_id.h" 20 #include "gpu/command_buffer/common/command_buffer_id.h"
20 #include "gpu/command_buffer/common/constants.h" 21 #include "gpu/command_buffer/common/constants.h"
21 #include "mojo/public/cpp/bindings/array.h" 22 #include "mojo/public/cpp/bindings/array.h"
22 #include "mojo/public/cpp/system/buffer.h" 23 #include "mojo/public/cpp/system/buffer.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 gpu::CommandBufferId command_buffer_id, 137 gpu::CommandBufferId command_buffer_id,
137 uint64_t release); 138 uint64_t release);
138 void OnParseError(); 139 void OnParseError();
139 void OnContextLost(uint32_t reason); 140 void OnContextLost(uint32_t reason);
140 void OnGpuCompletedSwapBuffers(gfx::SwapResult result); 141 void OnGpuCompletedSwapBuffers(gfx::SwapResult result);
141 142
142 const gpu::CommandBufferNamespace command_buffer_namespace_; 143 const gpu::CommandBufferNamespace command_buffer_namespace_;
143 const gpu::CommandBufferId command_buffer_id_; 144 const gpu::CommandBufferId command_buffer_id_;
144 gfx::AcceleratedWidget widget_; 145 gfx::AcceleratedWidget widget_;
145 Client* client_; // NOT OWNED. 146 Client* client_; // NOT OWNED.
146 scoped_ptr<gpu::CommandBufferService> command_buffer_; 147 std::unique_ptr<gpu::CommandBufferService> command_buffer_;
147 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; 148 std::unique_ptr<gpu::gles2::GLES2Decoder> decoder_;
148 scoped_ptr<gpu::CommandExecutor> executor_; 149 std::unique_ptr<gpu::CommandExecutor> executor_;
149 scoped_refptr<gpu::SyncPointOrderData> sync_point_order_data_; 150 scoped_refptr<gpu::SyncPointOrderData> sync_point_order_data_;
150 scoped_ptr<gpu::SyncPointClient> sync_point_client_; 151 std::unique_ptr<gpu::SyncPointClient> sync_point_client_;
151 scoped_refptr<gfx::GLContext> context_; 152 scoped_refptr<gfx::GLContext> context_;
152 scoped_refptr<gfx::GLSurface> surface_; 153 scoped_refptr<gfx::GLSurface> surface_;
153 scoped_refptr<GpuState> gpu_state_; 154 scoped_refptr<GpuState> gpu_state_;
154 155
155 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_; 156 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_;
156 base::Callback<void(int32_t)> context_lost_callback_; 157 base::Callback<void(int32_t)> context_lost_callback_;
157 158
158 base::TimeTicks process_delayed_work_time_; 159 base::TimeTicks process_delayed_work_time_;
159 uint32_t previous_processed_num_; 160 uint32_t previous_processed_num_;
160 base::TimeTicks last_idle_time_; 161 base::TimeTicks last_idle_time_;
161 162
162 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; 163 base::WeakPtrFactory<CommandBufferDriver> weak_factory_;
163 164
164 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); 165 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver);
165 }; 166 };
166 167
167 } // namespace mus 168 } // namespace mus
168 169
169 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ 170 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_
OLDNEW
« no previous file with comments | « components/mus/demo/mus_demo.cc ('k') | components/mus/gles2/command_buffer_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698