| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h" | 5 #include "services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 gmb_handle, size, format, usage, | 124 gmb_handle, size, format, usage, |
| 125 base::Bind(&NotifyDestructionOnCorrectThread, thread_.task_runner(), | 125 base::Bind(&NotifyDestructionOnCorrectThread, thread_.task_runner(), |
| 126 callback))); | 126 callback))); |
| 127 if (!buffer) { | 127 if (!buffer) { |
| 128 DeletedGpuMemoryBuffer(gmb_handle.id, gpu::SyncToken()); | 128 DeletedGpuMemoryBuffer(gmb_handle.id, gpu::SyncToken()); |
| 129 return nullptr; | 129 return nullptr; |
| 130 } | 130 } |
| 131 return std::move(buffer); | 131 return std::move(buffer); |
| 132 } | 132 } |
| 133 | 133 |
| 134 std::unique_ptr<gfx::GpuMemoryBuffer> | |
| 135 ClientGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle( | |
| 136 const gfx::GpuMemoryBufferHandle& handle, | |
| 137 const gfx::Size& size, | |
| 138 gfx::BufferFormat format) { | |
| 139 NOTIMPLEMENTED(); | |
| 140 return nullptr; | |
| 141 } | |
| 142 | |
| 143 void ClientGpuMemoryBufferManager::SetDestructionSyncToken( | 134 void ClientGpuMemoryBufferManager::SetDestructionSyncToken( |
| 144 gfx::GpuMemoryBuffer* buffer, | 135 gfx::GpuMemoryBuffer* buffer, |
| 145 const gpu::SyncToken& sync_token) { | 136 const gpu::SyncToken& sync_token) { |
| 146 static_cast<gpu::GpuMemoryBufferImpl*>(buffer)->set_destruction_sync_token( | 137 static_cast<gpu::GpuMemoryBufferImpl*>(buffer)->set_destruction_sync_token( |
| 147 sync_token); | 138 sync_token); |
| 148 } | 139 } |
| 149 | 140 |
| 150 } // namespace ui | 141 } // namespace ui |
| OLD | NEW |