Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Issue 1280033004: Revert of Mac Overlays: Add GPU back-pressure (Closed)

Created:
5 years, 4 months ago by Ken Russell (switch to Gerrit)
Modified:
5 years, 4 months ago
Reviewers:
tapted, dcheng, jbauman, ccameron
CC:
chromium-reviews, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, nona+watch_chromium.org, piman+watch_chromium.org, shuchen+watch_chromium.org, sievers+watch_chromium.org, James Su, tfarina, yusukes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Mac Overlays: Add GPU back-pressure (patchset #8 id:140001 of https://codereview.chromium.org/1273563002/ ) Reason for revert: This broke the WebGL 2.0 prototype on Mac OS -- please see https://code.google.com/p/chromium/issues/detail?id=515696#c16 for details. Original issue's description: > Mac Overlays: Add GPU back-pressure > > Issue a GL fence after every SwapBuffers. Do not call -[CALayer > setContents:] with the content being rendered by that SwapBuffers until > the fence has passed. > > Query the previous's frame's GL fence at the beginning of each > SwapBuffers. Also issue a callback to query the GL fence at the > mid-point of the VSync period (if there is no subsequent SwapBuffers, > or if the frame takes more than one VSync to render). > > Note that waiting for the GL fence to complete before calling -[CALayer > setContents] is not required for correctness -- only the expected content > (everything before the glFlush) will appear in the layer. Rather, the > reason for waiting for the GL fence is to make the time at which the > content will appear on-screen more reliable. > > Because there may be multiple calls to SwapBuffers in flight, store the > data necessary to call -[CALayer setContents] in a PendingSwap > structure. Maintain a queue of these structures. > > Because the ImageTransportSurface does not know anything about the > VSync period, send the CGDirectDisplayID for the attached display to the > ImageTransportSurface in the AcceleratedSurfaceMsg_BufferPresented IPC > (which is where the CGL renderer ID is already communicated). Send this > information instead of the raw VSync parameters so that the updates to > all windows on a single display may be coalesced into a single callback > in the future. > > Note that this display is the display that is used for vsync by the > RenderWidgetHostViewMac, so if vsync is disabled, it will be 0. > > Separate gfx::ScopedSetGLToRealGLApi into its own header file to > simplify header orders. > > Access the IOSurface of the GLImageIOSurface directly, rather than > using its ScheduleOverlayPlane method. This simplifies things > immediately, in that we can reason about the underlying IOSurface's > lifetime better than weak pointers to images. It will also simplify > the implementation of partial swap and multiple overlays. > > BUG=515696 > > Committed: https://crrev.com/5c207cac73c835b5f362670d6b46333dfae1f4c4 > Cr-Commit-Position: refs/heads/master@{#342548} TBR=dcheng@chromium.org,jbauman@chromium.org,tapted@chromium.org,ccameron@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=515696 Committed: https://crrev.com/9f6cac12a46fb8960d4dc25ae5901906697a45f8 Cr-Commit-Position: refs/heads/master@{#342566}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -438 lines) Patch
M content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M content/browser/gpu/gpu_process_host_ui_shim.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 chunk +0 lines, -7 lines 0 comments Download
M content/common/gpu/gpu_messages.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/common/gpu/image_transport_surface_calayer_mac.mm View 1 chunk +1 line, -1 line 0 comments Download
M content/common/gpu/image_transport_surface_overlay_mac.h View 3 chunks +3 lines, -41 lines 0 comments Download
M content/common/gpu/image_transport_surface_overlay_mac.mm View 3 chunks +28 lines, -265 lines 0 comments Download
M gpu/command_buffer/service/gl_context_virtual.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M ui/accelerated_widget_mac/accelerated_widget_mac.h View 3 chunks +1 line, -5 lines 0 comments Download
M ui/accelerated_widget_mac/accelerated_widget_mac.mm View 3 chunks +1 line, -9 lines 0 comments Download
M ui/accelerated_widget_mac/display_link_mac.h View 3 chunks +1 line, -10 lines 0 comments Download
M ui/accelerated_widget_mac/display_link_mac.cc View 3 chunks +0 lines, -22 lines 0 comments Download
M ui/gl/BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
M ui/gl/gl.gyp View 1 chunk +0 lines, -2 lines 0 comments Download
M ui/gl/gl_gl_api_implementation.h View 2 chunks +9 lines, -1 line 0 comments Download
M ui/gl/gl_gl_api_implementation.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M ui/gl/gl_image_io_surface.h View 1 chunk +0 lines, -2 lines 0 comments Download
M ui/gl/gl_image_io_surface.mm View 1 chunk +16 lines, -6 lines 0 comments Download
D ui/gl/scoped_api.h View 1 chunk +0 lines, -28 lines 0 comments Download
D ui/gl/scoped_api.cc View 1 chunk +0 lines, -20 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.h View 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/cocoa/bridged_native_widget.mm View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Ken Russell (switch to Gerrit)
Created Revert of Mac Overlays: Add GPU back-pressure
5 years, 4 months ago (2015-08-09 18:54:20 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1280033004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1280033004/1
5 years, 4 months ago (2015-08-09 18:54:28 UTC) #2
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 4 months ago (2015-08-09 18:54:51 UTC) #3
commit-bot: I haz the power
5 years, 4 months ago (2015-08-09 18:55:36 UTC) #4
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/9f6cac12a46fb8960d4dc25ae5901906697a45f8
Cr-Commit-Position: refs/heads/master@{#342566}

Powered by Google App Engine
This is Rietveld 408576698