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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: convert newly added scoped_ptr's 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/in_process_command_buffer.cc
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index 5936b97c9ab8a9b8a8963bbee0d7a2d1bb8587b1..814b23b6fb72048d63b116c18bfece9b3da0b3e4 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -90,7 +90,7 @@ struct GpuInProcessThreadHolder {
GpuInProcessThreadHolder()
: sync_point_manager(new SyncPointManager(false)),
gpu_thread(new GpuInProcessThread(sync_point_manager.get())) {}
- scoped_ptr<SyncPointManager> sync_point_manager;
+ std::unique_ptr<SyncPointManager> sync_point_manager;
scoped_refptr<InProcessCommandBuffer::Service> gpu_thread;
};
@@ -325,7 +325,7 @@ bool InProcessCommandBuffer::InitializeOnGpuThread(
transfer_buffer_manager_ = manager;
manager->Initialize();
- scoped_ptr<CommandBufferService> command_buffer(
+ std::unique_ptr<CommandBufferService> command_buffer(
new CommandBufferService(transfer_buffer_manager_.get()));
command_buffer->SetPutOffsetChangeCallback(base::Bind(
&InProcessCommandBuffer::PumpCommandsOnGpuThread, gpu_thread_weak_ptr_));
@@ -842,7 +842,7 @@ int32_t InProcessCommandBuffer::CreateGpuMemoryBufferImage(
CheckSequencedThread();
DCHECK(gpu_memory_buffer_manager_);
- scoped_ptr<gfx::GpuMemoryBuffer> buffer(
+ std::unique_ptr<gfx::GpuMemoryBuffer> buffer(
gpu_memory_buffer_manager_->AllocateGpuMemoryBuffer(
gfx::Size(width, height),
gpu::DefaultBufferFormatForImageFormat(internalformat),
@@ -1027,7 +1027,7 @@ void PostCallback(
}
}
-void RunOnTargetThread(scoped_ptr<base::Closure> callback) {
+void RunOnTargetThread(std::unique_ptr<base::Closure> callback) {
DCHECK(callback.get());
callback->Run();
}
@@ -1038,7 +1038,7 @@ base::Closure InProcessCommandBuffer::WrapCallback(
const base::Closure& callback) {
// Make sure the callback gets deleted on the target thread by passing
// ownership.
- scoped_ptr<base::Closure> scoped_callback(new base::Closure(callback));
+ std::unique_ptr<base::Closure> scoped_callback(new base::Closure(callback));
base::Closure callback_on_client_thread =
base::Bind(&RunOnTargetThread, base::Passed(&scoped_callback));
base::Closure wrapped_callback =

Powered by Google App Engine
This is Rietveld 408576698