Chromium Code Reviews
DescriptionMac: Always use surfaceless mode
The goal of this change is to unify all image transport surfaces on Mac.
Prior to this, if we do not support remote CoreAnimation APIs, then we
will create an ImageTransportSurfaceFBO, which will send the IOSurface
that it creates in the GPU process to the browser process.
Change this to use the ImageTranportSurfaceOverlayMac. Using this
surface will trigger the use of
GpuSurfacelessBrowserCompositorOutputSurface instead of
GpuBrowserCompositorOutputSurface. This output surface allocates an
IOSurface-backed GpuMemoryBuffer in BufferQueue, which is rendered to.
When frames are swapped in ImageTranportSurfaceOverlayMac, and remote
CoreAnimation is not supported, send the backbuffer's IOSurface handle
to the browser in GpuHostMsg_AcceleratedSurfaceBuffersSwapped.
There is one snag here, where we are unable to open the IOSurface by
its handle if the GpuMemoryBuffer that was created by BufferQueue
has been destroyed. To fix this, make BufferQueue hold on to the
GpuMemoryBuffer while it may be in use.
Also, in GpuTransportFactory's CreateOverlayCandidateValidator, only
create a validator if the remote CoreAnimation API is supported, because
the non-remote-CoreAnimation path only supports drawing a single layer.
BUG=546795
Committed: https://crrev.com/516ddd741c0f9ec54947f4b23082e8c47d8d2278
Cr-Commit-Position: refs/heads/master@{#356301}
Patch Set 1 #Patch Set 2 : Remove extra diffs #
Total comments: 12
Patch Set 3 : Rebase #Patch Set 4 : Add export #Depends on Patchset: Dependent Patchsets: Messages
Total messages: 29 (11 generated)
|