| Index: ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| diff --git a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| index ce1f9caaff8b438098c730875c1b1cbc0d95684f..ac4a47fd610aef47c59853354e3c3917652209ca 100644
|
| --- a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| +++ b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| @@ -90,8 +90,9 @@ SurfaceFactoryOzone::BufferFormat GetOzoneFormatFor(
|
| return SurfaceFactoryOzone::RGBA_8888;
|
| }
|
|
|
| -std::pair<uint32_t, uint32_t> GetIndex(const gfx::GpuMemoryBufferId& id) {
|
| - return std::pair<uint32_t, uint32_t>(id.primary_id, id.secondary_id);
|
| +std::pair<uint32_t, uint32_t> GetIndex(gfx::GpuMemoryBufferId id,
|
| + int client_id) {
|
| + return std::pair<uint32_t, uint32_t>(id, client_id);
|
| }
|
| } // namespace
|
|
|
| @@ -104,7 +105,8 @@ GpuMemoryBufferFactoryOzoneNativeBuffer::
|
| }
|
|
|
| bool GpuMemoryBufferFactoryOzoneNativeBuffer::CreateGpuMemoryBuffer(
|
| - const gfx::GpuMemoryBufferId& id,
|
| + gfx::GpuMemoryBufferId id,
|
| + int client_id,
|
| const gfx::Size& size,
|
| gfx::GpuMemoryBuffer::Format format,
|
| gfx::GpuMemoryBuffer::Usage usage) {
|
| @@ -116,22 +118,25 @@ bool GpuMemoryBufferFactoryOzoneNativeBuffer::CreateGpuMemoryBuffer(
|
| << size.height() << " format " << format << ", usage " << usage;
|
| return false;
|
| }
|
| - native_pixmap_map_[GetIndex(id)] = pixmap;
|
| + native_pixmap_map_[GetIndex(id, client_id)] = pixmap;
|
| return true;
|
| }
|
|
|
| void GpuMemoryBufferFactoryOzoneNativeBuffer::DestroyGpuMemoryBuffer(
|
| - const gfx::GpuMemoryBufferId& id) {
|
| - native_pixmap_map_.erase(GetIndex(id));
|
| + gfx::GpuMemoryBufferId id,
|
| + int client_id) {
|
| + native_pixmap_map_.erase(GetIndex(id, client_id));
|
| }
|
|
|
| scoped_refptr<gfx::GLImage>
|
| GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForGpuMemoryBuffer(
|
| - const gfx::GpuMemoryBufferId& id,
|
| + gfx::GpuMemoryBufferId id,
|
| + int client_id,
|
| const gfx::Size& size,
|
| gfx::GpuMemoryBuffer::Format format,
|
| unsigned internalformat) {
|
| - BufferToPixmapMap::iterator it = native_pixmap_map_.find(GetIndex(id));
|
| + BufferToPixmapMap::iterator it =
|
| + native_pixmap_map_.find(GetIndex(id, client_id));
|
| if (it == native_pixmap_map_.end()) {
|
| return scoped_refptr<gfx::GLImage>();
|
| }
|
|
|