| Index: content/common/gpu/gpu_memory_buffer_factory_mac.cc
|
| diff --git a/content/common/gpu/gpu_memory_buffer_factory_mac.cc b/content/common/gpu/gpu_memory_buffer_factory_mac.cc
|
| index 2ad5bc92925de4797a88c08eff4fb89337be83be..18a13133564c96fd834c740f3e645ebc0b53bc4b 100644
|
| --- a/content/common/gpu/gpu_memory_buffer_factory_mac.cc
|
| +++ b/content/common/gpu/gpu_memory_buffer_factory_mac.cc
|
| @@ -18,24 +18,27 @@ class GpuMemoryBufferFactoryImpl : public GpuMemoryBufferFactory,
|
| public:
|
| // Overridden from GpuMemoryBufferFactory:
|
| 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::IO_SURFACE_BUFFER:
|
| return io_surface_factory_.CreateGpuMemoryBuffer(
|
| - handle.global_id, size, format);
|
| + id, size, format, client_id);
|
| default:
|
| NOTREACHED();
|
| return gfx::GpuMemoryBufferHandle();
|
| }
|
| }
|
| - void DestroyGpuMemoryBuffer(
|
| - const gfx::GpuMemoryBufferHandle& handle) override {
|
| - switch (handle.type) {
|
| + void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferType type,
|
| + gfx::GpuMemoryBufferId id,
|
| + int client_id) override {
|
| + switch (type) {
|
| case gfx::IO_SURFACE_BUFFER:
|
| - io_surface_factory_.DestroyGpuMemoryBuffer(handle.global_id);
|
| + io_surface_factory_.DestroyGpuMemoryBuffer(id, client_id);
|
| break;
|
| default:
|
| NOTREACHED();
|
| @@ -61,12 +64,8 @@ class GpuMemoryBufferFactoryImpl : public GpuMemoryBufferFactory,
|
| return image;
|
| }
|
| case gfx::IO_SURFACE_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 io_surface_factory_.CreateImageForGpuMemoryBuffer(
|
| - handle.global_id, size, format);
|
| + handle.id, size, format, client_id);
|
| }
|
| default:
|
| NOTREACHED();
|
|
|