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

Unified Diff: gpu/ipc/client/command_buffer_proxy_impl.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
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.h ('k') | gpu/ipc/client/gpu_channel_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/client/command_buffer_proxy_impl.cc
diff --git a/gpu/ipc/client/command_buffer_proxy_impl.cc b/gpu/ipc/client/command_buffer_proxy_impl.cc
index eaa2ff13dc7c0f45ce9fd9185eb908083423082b..7587212837fdca100c8ab632038e33b45ebce2b4 100644
--- a/gpu/ipc/client/command_buffer_proxy_impl.cc
+++ b/gpu/ipc/client/command_buffer_proxy_impl.cc
@@ -69,7 +69,7 @@ CommandBufferProxyImpl::~CommandBufferProxyImpl() {
}
bool CommandBufferProxyImpl::OnMessageReceived(const IPC::Message& message) {
- scoped_ptr<base::AutoLock> lock;
+ std::unique_ptr<base::AutoLock> lock;
if (lock_)
lock.reset(new base::AutoLock(*lock_));
bool handled = true;
@@ -92,7 +92,7 @@ bool CommandBufferProxyImpl::OnMessageReceived(const IPC::Message& message) {
}
void CommandBufferProxyImpl::OnChannelError() {
- scoped_ptr<base::AutoLock> lock;
+ std::unique_ptr<base::AutoLock> lock;
if (lock_)
lock.reset(new base::AutoLock(*lock_));
@@ -135,7 +135,7 @@ void CommandBufferProxyImpl::OnConsoleMessage(
}
void CommandBufferProxyImpl::AddDeletionObserver(DeletionObserver* observer) {
- scoped_ptr<base::AutoLock> lock;
+ std::unique_ptr<base::AutoLock> lock;
if (lock_)
lock.reset(new base::AutoLock(*lock_));
deletion_observers_.AddObserver(observer);
@@ -143,7 +143,7 @@ void CommandBufferProxyImpl::AddDeletionObserver(DeletionObserver* observer) {
void CommandBufferProxyImpl::RemoveDeletionObserver(
DeletionObserver* observer) {
- scoped_ptr<base::AutoLock> lock;
+ std::unique_ptr<base::AutoLock> lock;
if (lock_)
lock.reset(new base::AutoLock(*lock_));
deletion_observers_.RemoveObserver(observer);
@@ -346,7 +346,7 @@ scoped_refptr<gpu::Buffer> CommandBufferProxyImpl::CreateTransferBuffer(
int32_t new_id = channel_->ReserveTransferBufferId();
- scoped_ptr<base::SharedMemory> shared_memory(
+ std::unique_ptr<base::SharedMemory> shared_memory(
channel_->factory()->AllocateSharedMemory(size));
if (!shared_memory) {
if (last_state_.error == gpu::error::kNoError)
@@ -475,7 +475,7 @@ int32_t CommandBufferProxyImpl::CreateGpuMemoryBufferImage(
unsigned internal_format,
unsigned usage) {
CheckLock();
- scoped_ptr<gfx::GpuMemoryBuffer> buffer(
+ std::unique_ptr<gfx::GpuMemoryBuffer> buffer(
channel_->gpu_memory_buffer_manager()->AllocateGpuMemoryBuffer(
gfx::Size(width, height),
gpu::DefaultBufferFormatForImageFormat(internal_format),
@@ -719,7 +719,7 @@ void CommandBufferProxyImpl::InvalidGpuReply() {
}
void CommandBufferProxyImpl::InvalidGpuReplyOnClientThread() {
- scoped_ptr<base::AutoLock> lock;
+ std::unique_ptr<base::AutoLock> lock;
if (lock_)
lock.reset(new base::AutoLock(*lock_));
OnDestroyed(gpu::error::kInvalidGpuMessage, gpu::error::kLostContext);
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.h ('k') | gpu/ipc/client/gpu_channel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698