DescriptionChange CHROMIUM_image declarations to support multi planar input.
GLuint CreateImageCHROMIUM(ClientBuffer* buffers,
GLsizei width,
GLsizei height,
GLenum internalformat)
<buffers> specifies an array in which ClientBuffer elements corresponding to image planes are stored. The number of ClientBuffer object are inferred through the specified <internalformat>.
I went through and changed all the calls to CreateImageCHROMIUM().
In the next CLs, I will tackle these steps:
- Add new GpuMemoryBuffer formats such as gfx::GpuMemoryBuffer::X_8, gfx::GpuMemoryBuffer::X_2, and GLEnum GL_RGB_YUV420.
- Implement SHARED_MEMORY support for the new formats with multiple planes.
- Implement software multi-plane CHROMIUM_image support.
- Add GLImageLinuxDMABuffer support for multiple planes.
- Add OzoneNativeBuffer support for the new GpuMemoryBuffer formats.
BUG=439520
TEST= GpuMemoryBufferTest.Lifecycle in gl_tests, ResourceProviderTest.Image_GLTexture in cc_unittests, and BufferQueueStandaloneTest.FboBinding in content_unittests passes.
+--------------------------------------------------+
|GLuint CreateImageCHROMIUM(ClientBuffer* buffers, |
| GLsizei width, |
| GLsizei height, |
| GLenum internalformat) |
+-------------+------------------------------------+
| CALLS
+-------------+----------------------------+
|GLES2Implementation::CreateImageCHROMIUM()|
+-------------+----------------------------+
| CALLS
+-------------+-----------+----+ IMPLEMENTED BY
|GpuControl::CreateImage()|VIRT+--+------+--------------------+-----------------------------------------+
+-------------------------+----+ | | | |
| | | |
+---------------------------------v----+ | +--------------+----------------------+ +-------+-----------------------------+
|egl::Display::CreateImage() | | |CommandBufferProxyImpl::CreateImage()| |InProcessCommandBuffer::CreateImage()|
|MockClientGpuControl::CreateImage() | | +----------+------+-------------------+ +--------------------+----------------+
|PpapiCommandBufferProxy::CreateImage()| | +------+ | CALLS
+--------------------------------------+ | | IPC | CALLS +--------------------v------------------------+----+
| NOTIMPLEMENTED(); | | +------+ |ImageFactory::CreateImageForGpuMemoryBuffer()|VIRT|
+--------------------------------------+ | +----------+------+-------------------+ +---------------------------------------------+----+
| |GpuCommandBufferStub::OnCreateImage()|
+-----------------------------+ +------------------+------------------+ THREAD COMMUNICATION PATH
|test/GLmanager::CreateImage()| | CALLS
+-----------------------------+ +------------------+------------------------+
|gfx::GLImageRefCountedMemory | |GpuChannel::CreateImageForGpuMemoryBuffer()|
+-----------------------------+ +-------------------------------------------+
TEST PATH PROCESS COMMUNICATION PATH
GLES2Implementation methods use GpuControl interface to interact with Gpu. I added a new virtual method GpuControl::CreateImage() that overloads and takes multiple buffers. GpuControl has 6 subclasses where this method needs to be implemented:
- 3 of them; Display, MockClientGpuControl, PpapiCommandBufferProxy have NOTIMPLEMENTED().
- 1 of them; GLManager is a test class but includes an actual implementation based on gfx::GLImageRefCountedMemory. Multi buffer usage can be implemented in the next CLs via conversion to RGB.
- 2 of them; InProcessCommandBuffer and CommandBufferProxyImpl are the where actually communication with GPU happens.
PROCESS COMMUNICATION PATH THREAD COMMUNICATION PATH
+-------------------------------------------+ +------------------------------------------------+----+
|GpuChannel::CreateImageForGpuMemoryBuffer()| +----> ImageFactory::CreateImageForGpuMemoryBuffers() |VIRT|
+---------------+------------+--------------+ | +-------------+----------------------+---------+-+----+
| CALLS | | | IMPLEMENTED BY | | |
| +---------------------+ +-------------+--------------------+ | | |
| |GpuMemoryBufferFactorySharedMemory| | | |
+---------------+-----------------+ +----------------------------------+ | | |
|GLImageSharedMemory::Initialize()| |gfx::GLImageSharedMemory | | | |
+---------------------------------+ +----------------------------------+ | | |
| | |
| | |
+------------------------------------+------+ | |
|ui::GpuMemoryBufferFactoryOzoneNatiVeBuffer| | |
+-------------------------------------------+ | |
|ui::GLImageOzoneNatiVePixmap OR | | |
|ui::GLImageOzoneNatiVePixmapDmaBuf | | |
+-------------------------------------------+ | |
| |
+----------------------------------------------+ |
|ui::GpuMemoryBufferFactoryIOSurface | |
+----------------------------------------------+ |
|
+-----------------------------------------------------+
|ui::GpuMemoryBufferFactorySurfaceTexture |
+-----------------------------------------------------+
Patch Set 1 : Changing the function calls #
Total comments: 14
Patch Set 2 : mcasas@comments #
Total comments: 20
Patch Set 3 : reveman@ comments and const-corrected function signatures. #
Total comments: 12
Patch Set 4 : reveman@ comments and gpu::ImageFactory::ImageFormatToGpuMemoryBufferFormats. #Patch Set 5 : Handle through IPC. #
Total comments: 30
Patch Set 6 : reveman@ comments. #Patch Set 7 : ImageFactory::CreateImageForGpuMemoryBuffer interface changes. #
Total comments: 29
Patch Set 8 : Rebase. #Patch Set 9 : reveman@ comments. #Patch Set 10 : Added implementations of ImageFactory::CreateImageForGpuMemoryBuffers(). #
Total comments: 2
Patch Set 11 : reveman@ comments and fixes. #Patch Set 12 : Rebased. #Patch Set 13 : Cleanups and extra error checks. #Patch Set 14 : Static array size issue fixed. #Patch Set 15 : Trybot issues fixed. #
Total comments: 37
Patch Set 16 : reveman@ comments. #
Total comments: 18
Patch Set 17 : reveman@ comments. #
Total comments: 2
Messages
Total messages: 31 (8 generated)
|