Accept framebuffer size in CreateGpuMemoryBuffer()
This CL extends the GpuMemoryBufferFactory interface to allow CreateGpuMemoryBuffer() to take a framebuffer size. This is so that we can take advantage of the framebuffer_size parameter in the SurfaceFactoryOzone::CreateNativePixmap() argument. This is useful in Chrome OS to be able to allocate a buffer of a specific size while adding a DRM framebuffer of a different size. For example, suppose a hardware video decoder needs buffers of size 640x368 to decode a video whose visible rectangle is 640x360. In this case, the size of the DRM framebuffer should be 640x360 so that the display controller doesn't sample non-visible data if the video gets promoted to a hardware overlay. The extended API is needed because the new direct VD uses a GpuMemoryBufferFactory to allocate native buffers. It is only needed within the GPU process (it doesn't need to be exposed to clients). The extended API is used in CL:2340115. Bug: b:162880731 Test: None. Change-Id: Idf0c13e598fe730098424458af7515a320e6d511 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2340069Reviewed-by:Robert Kroeger <rjkroege@chromium.org> Reviewed-by:
Peng Huang <penghuang@chromium.org> Reviewed-by:
Daniele Castagna <dcastagna@chromium.org> Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org> Cr-Commit-Position: refs/heads/master@{#798995}
Showing
Please register or sign in to comment