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

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: undo part of clang-format 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 010c0fbb16822eb503ce89765935a47ac2d2364e..b907311c1426c04862a77a7d19472c2ceaf02521 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -88,7 +88,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;
};
@@ -320,7 +320,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::PumpCommands, gpu_thread_weak_ptr_));
@@ -821,7 +821,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::ImageFactory::DefaultBufferFormatForImageFormat(internalformat),
@@ -1004,7 +1004,7 @@ void PostCallback(
}
}
-void RunOnTargetThread(scoped_ptr<base::Closure> callback) {
+void RunOnTargetThread(std::unique_ptr<base::Closure> callback) {
DCHECK(callback.get());
callback->Run();
}
@@ -1015,7 +1015,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