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

Side by Side Diff: content/child/child_gpu_memory_buffer_manager.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/child_gpu_memory_buffer_manager.h" 5 #include "content/child/child_gpu_memory_buffer_manager.h"
6 6
7 #include <utility>
8
7 #include "content/common/child_process_messages.h" 9 #include "content/common/child_process_messages.h"
8 #include "content/common/generic_shared_memory_id_generator.h" 10 #include "content/common/generic_shared_memory_id_generator.h"
9 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" 11 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
10 12
11 namespace content { 13 namespace content {
12 namespace { 14 namespace {
13 15
14 void DeletedGpuMemoryBuffer(ThreadSafeSender* sender, 16 void DeletedGpuMemoryBuffer(ThreadSafeSender* sender,
15 gfx::GpuMemoryBufferId id, 17 gfx::GpuMemoryBufferId id,
16 const gpu::SyncToken& sync_token) { 18 const gpu::SyncToken& sync_token) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 52
51 scoped_ptr<GpuMemoryBufferImpl> buffer(GpuMemoryBufferImpl::CreateFromHandle( 53 scoped_ptr<GpuMemoryBufferImpl> buffer(GpuMemoryBufferImpl::CreateFromHandle(
52 handle, size, format, usage, 54 handle, size, format, usage,
53 base::Bind(&DeletedGpuMemoryBuffer, sender_, handle.id))); 55 base::Bind(&DeletedGpuMemoryBuffer, sender_, handle.id)));
54 if (!buffer) { 56 if (!buffer) {
55 sender_->Send(new ChildProcessHostMsg_DeletedGpuMemoryBuffer( 57 sender_->Send(new ChildProcessHostMsg_DeletedGpuMemoryBuffer(
56 handle.id, gpu::SyncToken())); 58 handle.id, gpu::SyncToken()));
57 return nullptr; 59 return nullptr;
58 } 60 }
59 61
60 return buffer.Pass(); 62 return std::move(buffer);
61 } 63 }
62 64
63 scoped_ptr<gfx::GpuMemoryBuffer> 65 scoped_ptr<gfx::GpuMemoryBuffer>
64 ChildGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle( 66 ChildGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle(
65 const gfx::GpuMemoryBufferHandle& handle, 67 const gfx::GpuMemoryBufferHandle& handle,
66 const gfx::Size& size, 68 const gfx::Size& size,
67 gfx::BufferFormat format) { 69 gfx::BufferFormat format) {
68 NOTIMPLEMENTED(); 70 NOTIMPLEMENTED();
69 return nullptr; 71 return nullptr;
70 } 72 }
71 73
72 gfx::GpuMemoryBuffer* 74 gfx::GpuMemoryBuffer*
73 ChildGpuMemoryBufferManager::GpuMemoryBufferFromClientBuffer( 75 ChildGpuMemoryBufferManager::GpuMemoryBufferFromClientBuffer(
74 ClientBuffer buffer) { 76 ClientBuffer buffer) {
75 return GpuMemoryBufferImpl::FromClientBuffer(buffer); 77 return GpuMemoryBufferImpl::FromClientBuffer(buffer);
76 } 78 }
77 79
78 void ChildGpuMemoryBufferManager::SetDestructionSyncToken( 80 void ChildGpuMemoryBufferManager::SetDestructionSyncToken(
79 gfx::GpuMemoryBuffer* buffer, 81 gfx::GpuMemoryBuffer* buffer,
80 const gpu::SyncToken& sync_token) { 82 const gpu::SyncToken& sync_token) {
81 static_cast<GpuMemoryBufferImpl*>(buffer) 83 static_cast<GpuMemoryBufferImpl*>(buffer)
82 ->set_destruction_sync_token(sync_token); 84 ->set_destruction_sync_token(sync_token);
83 } 85 }
84 86
85 } // namespace content 87 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_discardable_shared_memory_manager.cc ('k') | content/child/child_shared_bitmap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698