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

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: 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 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 f58140fae778d8c24366b6bfce6444ea2b3d1e9a..11a8b121637e83e3019a50252fd599cafd4aa101 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -85,7 +85,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;
};
@@ -327,7 +327,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_));
@@ -839,7 +839,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),
@@ -1014,7 +1014,7 @@ void PostCallback(
}
}
-void RunOnTargetThread(scoped_ptr<base::Closure> callback) {
+void RunOnTargetThread(std::unique_ptr<base::Closure> callback) {
DCHECK(callback.get());
callback->Run();
}
@@ -1025,7 +1025,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 =
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/command_buffer/service/memory_program_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698