Add NativePixmapHandle type & interface for exporting them
This adds a platform handle to gfx::GpuMemoryBufferHandle for
NativePixmap that can hold both the file descriptor & any needed
metadata (currently just buffer stride) instead of reusing the shared
memory handle.
GpuMemoryBufferFactoryOzoneNativePixmap creates one of these handles
via NativePixmap::ExportHandle() and passes it to the client
requesting buffer creation, which then passes it to
ClientNativePixmapFactory::ImportFromHandle() to create the client
object.
It's similar to Mac, where GpuMemoryBuffer relies on a lower handle
(IOSurfaceRef) for transporting the buffer (including metadata such as
the stride). The difference is file descriptor based handles can be
transported directly inside gfx::GpuMemoryBufferHandle.
BUG=475633
TEST=Manually tested Chrome OS link with flags:
--no-sandbox
--enable-native-gpu-memory-buffers
(1) Chrome comes up
(2) No rendering artifacts due to assuming minimum stride.
(tested with additional patch to implement VgemPixmap)
Review URL: https://codereview.chromium.org/1263323004
Cr-Commit-Position: refs/heads/master@{#344671}
17 files changed