We started redesigning GpuMemoryBuffer interface to handle multiple buffers [0].
commit607ed17ba5d0d1c67901ecc7160db660f08bd831
authoremircan <emircan@chromium.org>
Wed, 8 Apr 2015 06:25:00 +0000 (7 23:25 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 8 Apr 2015 06:25:48 +0000 (8 06:25 +0000)
tree8c8d692aaff4c1110998718c9cd587e0e76a47ee
parent7e576157bba19b8918f0ad2e3a43d0171a675155
We started redesigning GpuMemoryBuffer interface to handle multiple buffers [0].

[0] https://codereview.chromium.org/1024113003/#ps200001

In this CL:

- I added a new format gfx::GpuMemoryBuffer::YUV_420
- Implemented helper functions to use with it on GpuMemoryBufferImpl.
- I added support in GpuMemoryBufferImplSharedMemory and GpuMemoryBufferFactorySharedMemory
- I added { gfx::GpuMemoryBuffer::YUV_420, gfx::GpuMemoryBuffer::MAP } as a supported config for testing
- I added support for multi plane in test implementations: test_gpu_memory_buffer_manager, gl_manager, gpu_memory_buffer_impl_unittest

The future steps are:
- Add a new GL_* internalformat corresponding to YUV_420
- Implement support for YUV_420 in GpuMemoryBufferFactoryOzoneNativeBuffer, GLImageLinuxDMABuffer and SurfaceFactoryOzone
- Expose file descriptors for gfx::GpuMemoryBuffer::YUV_420 via Map() or GpuMemoryBufferHandle struct
  Check usage of gbm_bo_get_fd() at the lowest gbmbuffer level
- Add support in GLImageSharedMemory and GLImageMemory through Bind functions
- Look for possible use cases of multiple buffers on Android, Mac, and Win platforms

BUG=439520
TEST=content_unittests  --gtest_filter=GpuMemoryBufferImplTests.*
content_unittests  --gtest_filter=GpuMemoryBufferFactoryTest.*
gl_tests --gtest_filter=GpuMemoryBufferTest*

Review URL: https://codereview.chromium.org/1062853002

Cr-Commit-Position: refs/heads/master@{#324190}
17 files changed:
cc/test/test_gpu_memory_buffer_manager.cc
content/common/gpu/client/gpu_memory_buffer_impl.cc
content/common/gpu/client/gpu_memory_buffer_impl.h
content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h
content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.cc
content/common/gpu/client/gpu_memory_buffer_impl_unittest.cc
content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
content/common/gpu/gpu_memory_buffer_factory_unittest.cc
gpu/command_buffer/service/image_factory.cc
gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
gpu/command_buffer/tests/gl_manager.cc
ui/gfx/gpu_memory_buffer.h
ui/gl/gl_image_linux_dma_buffer.cc
ui/gl/gl_image_memory.cc
ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc