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.
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 Review URL: https://codereview.chromium.org/1273563002 Cr-Commit-Position: refs/heads/master@{#342548}
- Loading branch information
1 parent
ff50d89
commit 5c207ca
Showing
23 changed files
with
437 additions
and
69 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.