CompositorFrame has both CompositorFrameMetdata and GLFrameData included in it. Most of the time GLFrameData is null and unused. It's only when GLRenderer or SoftwareRenderer calls OutputSurface::SwapBuffers(CompositorFrame) does GLFrameData get filled in.
GLFrameData could be removed from CompositorFrame and a new struct containing GLFrameData could be passed to OutputSurface::SwapBuffers(). The only other part of CompositorFrameMetadata that is needed here is LatencyInfo. That could be added to the new struct along with GLFrameData.
Dana suggested the name OutputSurfaceFrame. This way the CompositorFrameSink would take a CompositorFrame and OutputSurface would take a OutputSurfaceFrame.
So plan of action is to:
1. Remove GLFrameData from CompositorFrame.
2. Rename GLFrameData to OutputSurfaceFrame.
3. Add LatencyInfo to OutputSurfaceFrame.
4. Change OutputSurface::SwapBuffers() to take an OutputSurfaceFrame.
Comment 1 by danakj@chromium.org
, Sep 30 2016