forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert of Mac Overlays: Add GPU back-pressure (patchset chromium#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 Review URL: https://codereview.chromium.org/1280033004 Cr-Commit-Position: refs/heads/master@{#342566}
- Loading branch information
1 parent
d8f5fd8
commit 9f6cac1
Showing
23 changed files
with
69 additions
and
437 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.