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

Unified Diff: gpu/command_buffer/service/command_buffer_service.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/command_buffer_service.cc
diff --git a/gpu/command_buffer/service/command_buffer_service.cc b/gpu/command_buffer/service/command_buffer_service.cc
index 368bc1c1a0249b7695865ee93bbffd7d82446b1d..9c3d9b03c5c3291c009f6c8d5cd9b76e040afe9e 100644
--- a/gpu/command_buffer/service/command_buffer_service.cc
+++ b/gpu/command_buffer/service/command_buffer_service.cc
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <limits>
+#include <memory>
#include "base/logging.h"
#include "base/trace_event/trace_event.h"
@@ -105,7 +106,7 @@ void CommandBufferService::SetGetBuffer(int32_t transfer_buffer_id) {
}
void CommandBufferService::SetSharedStateBuffer(
- scoped_ptr<BufferBacking> shared_state_buffer) {
+ std::unique_ptr<BufferBacking> shared_state_buffer) {
shared_state_buffer_ = std::move(shared_state_buffer);
DCHECK(shared_state_buffer_->GetSize() >= sizeof(*shared_state_));
@@ -124,7 +125,7 @@ scoped_refptr<Buffer> CommandBufferService::CreateTransferBuffer(size_t size,
int32_t* id) {
*id = -1;
- scoped_ptr<SharedMemory> shared_memory(new SharedMemory());
+ std::unique_ptr<SharedMemory> shared_memory(new SharedMemory());
if (!shared_memory->CreateAndMapAnonymous(size)) {
if (error_ == error::kNoError)
error_ = gpu::error::kOutOfBounds;
@@ -162,7 +163,7 @@ scoped_refptr<Buffer> CommandBufferService::GetTransferBuffer(int32_t id) {
bool CommandBufferService::RegisterTransferBuffer(
int32_t id,
- scoped_ptr<BufferBacking> buffer) {
+ std::unique_ptr<BufferBacking> buffer) {
return transfer_buffer_manager_->RegisterTransferBuffer(id,
std::move(buffer));
}
« no previous file with comments | « gpu/command_buffer/service/command_buffer_service.h ('k') | gpu/command_buffer/service/command_buffer_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698