| Index: content/common/gpu/gpu_memory_buffer_factory_ozone.cc
|
| diff --git a/content/common/gpu/gpu_memory_buffer_factory_ozone.cc b/content/common/gpu/gpu_memory_buffer_factory_ozone.cc
|
| index 4259a4653f5e3d9177b0ffa156716529a02ad049..81c6d2358efeac1f497ee3466db978940ecbf1b9 100644
|
| --- a/content/common/gpu/gpu_memory_buffer_factory_ozone.cc
|
| +++ b/content/common/gpu/gpu_memory_buffer_factory_ozone.cc
|
| @@ -18,14 +18,16 @@ class GpuMemoryBufferFactoryImpl : public GpuMemoryBufferFactory,
|
| public:
|
| // Overridden from GpuMemoryBufferFactory:
|
| virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
|
| - const gfx::GpuMemoryBufferHandle& handle,
|
| + gfx::GpuMemoryBufferType type,
|
| + gfx::GpuMemoryBufferId id,
|
| const gfx::Size& size,
|
| gfx::GpuMemoryBuffer::Format format,
|
| - gfx::GpuMemoryBuffer::Usage usage) override {
|
| - switch (handle.type) {
|
| + gfx::GpuMemoryBuffer::Usage usage,
|
| + int client_id) override {
|
| + switch (type) {
|
| case gfx::OZONE_NATIVE_BUFFER:
|
| return ozone_buffer_factory_.CreateGpuMemoryBuffer(
|
| - handle.global_id, size, format, usage)
|
| + id, size, format, usage, client_id)
|
| ? handle
|
| : gfx::GpuMemoryBufferHandle();
|
| default:
|
| @@ -33,11 +35,12 @@ class GpuMemoryBufferFactoryImpl : public GpuMemoryBufferFactory,
|
| return gfx::GpuMemoryBufferHandle();
|
| }
|
| }
|
| - virtual void DestroyGpuMemoryBuffer(
|
| - const gfx::GpuMemoryBufferHandle& handle) override {
|
| - switch (handle.type) {
|
| + virtual void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferType type,
|
| + gfx::GpuMemoryBufferId id,
|
| + int client_id) override {
|
| + switch (type) {
|
| case gfx::OZONE_NATIVE_BUFFER:
|
| - ozone_buffer_factory_.DestroyGpuMemoryBuffer(handle.global_id);
|
| + ozone_buffer_factory_.DestroyGpuMemoryBuffer(id, client_id);
|
| break;
|
| default:
|
| NOTREACHED();
|
| @@ -63,12 +66,8 @@ class GpuMemoryBufferFactoryImpl : public GpuMemoryBufferFactory,
|
| return image;
|
| }
|
| case gfx::OZONE_NATIVE_BUFFER:
|
| - // Verify that client is the owner of the buffer we're about to use.
|
| - if (handle.global_id.secondary_id != client_id)
|
| - return scoped_refptr<gfx::GLImage>();
|
| -
|
| return ozone_buffer_factory_.CreateImageForGpuMemoryBuffer(
|
| - handle.global_id, size, format, internalformat);
|
| + handle.id, size, format, internalformat, client_id);
|
| default:
|
| NOTREACHED();
|
| return scoped_refptr<gfx::GLImage>();
|
|
|