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

Side by Side Diff: services/ui/public/cpp/mojo_gpu_memory_buffer_manager.cc

Issue 2487783003: gpu: Directly cast ClientBuffer to gfx::GpuMemoryBuffer (Closed)
Patch Set: . Created 4 years, 1 month 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 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/mojo_gpu_memory_buffer_manager.h" 5 #include "services/ui/public/cpp/mojo_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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 std::unique_ptr<gfx::GpuMemoryBuffer> 120 std::unique_ptr<gfx::GpuMemoryBuffer>
121 MojoGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle( 121 MojoGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle(
122 const gfx::GpuMemoryBufferHandle& handle, 122 const gfx::GpuMemoryBufferHandle& handle,
123 const gfx::Size& size, 123 const gfx::Size& size,
124 gfx::BufferFormat format) { 124 gfx::BufferFormat format) {
125 NOTIMPLEMENTED(); 125 NOTIMPLEMENTED();
126 return nullptr; 126 return nullptr;
127 } 127 }
128 128
129 gfx::GpuMemoryBuffer*
130 MojoGpuMemoryBufferManager::GpuMemoryBufferFromClientBuffer(
131 ClientBuffer buffer) {
132 return gpu::GpuMemoryBufferImpl::FromClientBuffer(buffer);
133 }
134
135 void MojoGpuMemoryBufferManager::SetDestructionSyncToken( 129 void MojoGpuMemoryBufferManager::SetDestructionSyncToken(
136 gfx::GpuMemoryBuffer* buffer, 130 gfx::GpuMemoryBuffer* buffer,
137 const gpu::SyncToken& sync_token) { 131 const gpu::SyncToken& sync_token) {
138 static_cast<gpu::GpuMemoryBufferImpl*>(buffer)->set_destruction_sync_token( 132 static_cast<gpu::GpuMemoryBufferImpl*>(buffer)->set_destruction_sync_token(
139 sync_token); 133 sync_token);
140 } 134 }
141 135
142 } // namespace ui 136 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/mojo_gpu_memory_buffer_manager.h ('k') | services/ui/ws/mus_gpu_memory_buffer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698