gpu: Client & Service side interface for Swap Chain implementation

CreateSwapChain and PresentSwapChain methods are implemented using
Shared Image system (sending commands via Shared Image stream).

PresentSwapChain method requires synchronization between command
buffer and shared image stream (to ensure execution of all rendering
commands to the frame before executing Present). This is achieved
by passing a sync token.

CreateSwapChain method returns two mailboxes (frontbuffer and
backbuffer mailbox) to the client. At the service side, it calls
the CreateSwapChain implementation in SwapChainFactoryDXGI class.

PresentSwapChain is implemented within SharedImageBacking. By using the
mailbox argument, we can find the backing linked with this mailbox and
call Present on the underlying swap chain.

Follow up CL will hold the logic of creating and presenting
IDXGISwapChain. Create method will return two backings for swap chain’s
front and back buffer. Swap chain specific backings class will be
created to hold reference to created swap chain.

Bug: 939655
Change-Id: I189728c0e3ddb0782d14c56bf0756743236ea251
Reviewed-by: Daniel Cheng <>
Reviewed-by: Antoine Labour <>
Reviewed-by: Sunny Sachanandani <>
Commit-Queue: Ashitha Santhosh <>
Cr-Commit-Position: refs/heads/master@{#653692}
18 files changed