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

Side by Side Diff: services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc

Issue 2572703004: exo: Directly create GpuMemoryBufferImpl when a handle is available. (Closed)
Patch Set: null callback Created 4 years 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
« no previous file with comments | « services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698