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

Side by Side Diff: blimp/client/feature/compositor/blimp_gpu_memory_buffer_manager.cc

Issue 1975023002: Add GpuMemoryBuffer CreateFromClientId interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just the interface Created 4 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/client/feature/compositor/blimp_gpu_memory_buffer_manager.h" 5 #include "blimp/client/feature/compositor/blimp_gpu_memory_buffer_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 gfx::BufferFormat format) { 126 gfx::BufferFormat format) {
127 if (handle.type != gfx::SHARED_MEMORY_BUFFER) 127 if (handle.type != gfx::SHARED_MEMORY_BUFFER)
128 return nullptr; 128 return nullptr;
129 129
130 return base::WrapUnique<gfx::GpuMemoryBuffer>(new GpuMemoryBufferImpl( 130 return base::WrapUnique<gfx::GpuMemoryBuffer>(new GpuMemoryBufferImpl(
131 size, format, 131 size, format,
132 base::WrapUnique(new base::SharedMemory(handle.handle, false)), 132 base::WrapUnique(new base::SharedMemory(handle.handle, false)),
133 handle.offset, handle.stride)); 133 handle.offset, handle.stride));
134 } 134 }
135 135
136 std::unique_ptr<gfx::GpuMemoryBuffer>
137 BlimpGpuMemoryBufferManager::CreateGpuMemoryBufferFromClientId(
138 int client_id,
139 const gfx::GpuMemoryBufferId& gpu_memory_buffer_id) {
140 NOTIMPLEMENTED();
141 return nullptr;
142 }
143
136 gfx::GpuMemoryBuffer* 144 gfx::GpuMemoryBuffer*
137 BlimpGpuMemoryBufferManager::GpuMemoryBufferFromClientBuffer( 145 BlimpGpuMemoryBufferManager::GpuMemoryBufferFromClientBuffer(
138 ClientBuffer buffer) { 146 ClientBuffer buffer) {
139 return reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer); 147 return reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer);
140 } 148 }
141 149
142 void BlimpGpuMemoryBufferManager::SetDestructionSyncToken( 150 void BlimpGpuMemoryBufferManager::SetDestructionSyncToken(
143 gfx::GpuMemoryBuffer* buffer, 151 gfx::GpuMemoryBuffer* buffer,
144 const gpu::SyncToken& sync_token) { 152 const gpu::SyncToken& sync_token) {
145 NOTIMPLEMENTED(); 153 NOTIMPLEMENTED();
146 } 154 }
147 155
148 } // namespace client 156 } // namespace client
149 } // namespace blimp 157 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/feature/compositor/blimp_gpu_memory_buffer_manager.h ('k') | cc/test/test_gpu_memory_buffer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698