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

Side by Side Diff: components/mus/gles2/command_buffer_local.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_LOCAL_H_ 5 #ifndef COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_
6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ 6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 bool DeleteOnGpuThread(base::WaitableEvent* event); 140 bool DeleteOnGpuThread(base::WaitableEvent* event);
141 bool SignalQueryOnGpuThread(uint32_t query_id, const base::Closure& callback); 141 bool SignalQueryOnGpuThread(uint32_t query_id, const base::Closure& callback);
142 142
143 // Helper functions are called in the client thread. 143 // Helper functions are called in the client thread.
144 void DidLoseContextOnClientThread(uint32_t reason); 144 void DidLoseContextOnClientThread(uint32_t reason);
145 void UpdateVSyncParametersOnClientThread(int64_t timebase, int64_t interval); 145 void UpdateVSyncParametersOnClientThread(int64_t timebase, int64_t interval);
146 void OnGpuCompletedSwapBuffersOnClientThread(gfx::SwapResult result); 146 void OnGpuCompletedSwapBuffersOnClientThread(gfx::SwapResult result);
147 147
148 gfx::AcceleratedWidget widget_; 148 gfx::AcceleratedWidget widget_;
149 scoped_refptr<GpuState> gpu_state_; 149 scoped_refptr<GpuState> gpu_state_;
150 scoped_ptr<CommandBufferDriver> driver_; 150 std::unique_ptr<CommandBufferDriver> driver_;
151 CommandBufferLocalClient* client_; 151 CommandBufferLocalClient* client_;
152 scoped_refptr<base::SingleThreadTaskRunner> client_thread_task_runner_; 152 scoped_refptr<base::SingleThreadTaskRunner> client_thread_task_runner_;
153 153
154 // Members accessed on the client thread: 154 // Members accessed on the client thread:
155 gpu::GpuControlClient* gpu_control_client_; 155 gpu::GpuControlClient* gpu_control_client_;
156 gpu::CommandBuffer::State last_state_; 156 gpu::CommandBuffer::State last_state_;
157 mojo::ScopedSharedBufferHandle shared_state_handle_; 157 mojo::ScopedSharedBufferHandle shared_state_handle_;
158 gpu::CommandBufferSharedState* shared_state_; 158 gpu::CommandBufferSharedState* shared_state_;
159 int32_t last_put_offset_; 159 int32_t last_put_offset_;
160 gpu::Capabilities capabilities_; 160 gpu::Capabilities capabilities_;
161 int32_t next_transfer_buffer_id_; 161 int32_t next_transfer_buffer_id_;
162 int32_t next_image_id_; 162 int32_t next_image_id_;
163 uint64_t next_fence_sync_release_; 163 uint64_t next_fence_sync_release_;
164 uint64_t flushed_fence_sync_release_; 164 uint64_t flushed_fence_sync_release_;
165 bool lost_context_; 165 bool lost_context_;
166 166
167 // This sync point client is only for out of order Wait on client thread. 167 // This sync point client is only for out of order Wait on client thread.
168 scoped_ptr<gpu::SyncPointClient> sync_point_client_waiter_; 168 std::unique_ptr<gpu::SyncPointClient> sync_point_client_waiter_;
169 169
170 base::WeakPtr<CommandBufferLocal> weak_ptr_; 170 base::WeakPtr<CommandBufferLocal> weak_ptr_;
171 171
172 // This weak factory will be invalidated in the client thread, so all weak 172 // This weak factory will be invalidated in the client thread, so all weak
173 // pointers have to be dereferenced in the client thread too. 173 // pointers have to be dereferenced in the client thread too.
174 base::WeakPtrFactory<CommandBufferLocal> weak_factory_; 174 base::WeakPtrFactory<CommandBufferLocal> weak_factory_;
175 175
176 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal); 176 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal);
177 }; 177 };
178 178
179 } // namespace mus 179 } // namespace mus
180 180
181 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ 181 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_
OLDNEW
« no previous file with comments | « components/mus/gles2/command_buffer_impl.h ('k') | components/mus/gles2/command_buffer_local.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698