|
Clean up Mac swap acknowledgement code
Mac swap acks differ from other platforms for three reasons
1. When a swap ack comes from the GPU process, it does not mean that
the content is necessarily on-screen yet -- it may be that we will
need to wait for that content to be drawn into a CAOpenGLLayer.
For this reason, we created a separate OnSurfaceDisplayed callback,
which happens when the surface is actually drawn.
2. Smooth resize on Mac requires that the IPCs for swap acks go
through the GpuProcessHostUIShim (as opposed to the command
buffer stub, as on other platforms).
3. Swap acks coming from the GPU process carry additional information
that is needed to get the content on the screen on Mac (in
particular, the CAContextID or IOSurface).
With the consolidation of display paths on Mac, reason 1 is finally
gone. The other reasons remain, and for this reason, Mac still needs
to be slightly different than the other platforms (which use the
GpuCommandBufferMsg_SwapBuffersCompleted IPC, and a callback from
CommandBufferProxyImpl to get the ack).
Instead of calling ImageTransportFactory::OnSurfaceDisplayed, call
instead ImageTransportFactory::OnSwapBuffersCompleted, which will
call BrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted,
which is where all other platforms' swap acks bottom out as well
(their calls come from the CommandBufferProxyImpl).
In the process of this, move OnGpuSwapBuffersCompleted from being
named OnSwapBuffersCompleted in GpuBrowserCompositorOutputSurface
to being a method of BrowserCompositorOutputSurface (with Gpu in
its name, to indicate the source).
Delete the web of callbacks going through AcceleratedWidgetMac that
were responsible for the delayed swap-ack.
Remove now-unused IPC fields.
Committed: https://crrev.com/4d4a02b8db7c319f26e823fcea22fd2b3797f538
Cr-Commit-Position: refs/heads/master@{#356956}
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+125 lines, -322 lines) |
Patch |
 |
M |
content/browser/compositor/browser_compositor_output_surface.h
|
View
|
1
|
2 chunks |
+9 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/compositor/gpu_browser_compositor_output_surface.h
|
View
|
1
|
3 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/gpu_browser_compositor_output_surface.cc
|
View
|
1
|
2 chunks |
+4 lines, -14 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/gpu_process_transport_factory.h
|
View
|
1
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/compositor/gpu_process_transport_factory.cc
|
View
|
1
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h
|
View
|
1
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
|
View
|
1
|
2 chunks |
+3 lines, -13 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/image_transport_factory.h
|
View
|
1
|
3 chunks |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/compositor/offscreen_browser_compositor_output_surface.h
|
View
|
1
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/compositor/reflector_impl_unittest.cc
|
View
|
1
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/compositor/software_browser_compositor_output_surface.h
|
View
|
1
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/compositor/software_browser_compositor_output_surface.cc
|
View
|
1
|
1 chunk |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/software_output_device_mac.mm
|
View
|
1
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/test/no_transport_image_transport_factory.h
|
View
|
1
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/gpu/gpu_process_host_ui_shim.cc
|
View
|
1
|
3 chunks |
+10 lines, -16 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_widget_host_view_mac.h
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_widget_host_view_mac.mm
|
View
|
|
3 chunks |
+2 lines, -67 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/gpu_messages.h
|
View
|
1
2
|
1 chunk |
+0 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/image_transport_surface_overlay_mac.mm
|
View
|
1
2
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/accelerated_widget_mac/accelerated_widget_mac.h
|
View
|
|
5 chunks |
+12 lines, -56 lines |
0 comments
|
Download
|
 |
M |
ui/accelerated_widget_mac/accelerated_widget_mac.mm
|
View
|
1
2
|
6 chunks |
+22 lines, -101 lines |
0 comments
|
Download
|
 |
M |
ui/views/cocoa/bridged_native_widget.h
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
ui/views/cocoa/bridged_native_widget.mm
|
View
|
|
3 chunks |
+1 line, -10 lines |
0 comments
|
Download
|
 |
M |
ui/views/widget/native_widget_mac_unittest.mm
|
View
|
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
Total messages: 23 (8 generated)
|