[Cogl] [PATCH 3/3] Add CoglFrameTimings

Robert Bragg robert at sixbynine.org
Wed Dec 5 16:01:46 PST 2012


Thinking about the frame time again I think I may have changed my mind
about that now, sorry :-/

Although your docs do basically explain what the frame time is, I
think I mis-interpreted them a bit. I was thinking that the frame time
was just a timestamp taken when you start submitting drawing commands,
and it's only significance was to mark when you started rendering and
that somehow that was feeding into some heuristics down the line.

I realize now that it's intended to be *the* reference time used for
rendering the frame, to decide how all animations should be progressed
for example. I can also see that it's useful to be able to share this
reference timestamp between components so that you don't end up with
components coming up with slightly different ideas of what state they
need to render.

An alternative api for being able to associate arbitrary data with a
FrameInfo object wouldn't be a good substitute here since it means all
those components now need to share a known key for the data and know
the layout of the data.

Since conceptually this doesn't sound like its specific to
CoglOnscreen rendering it seems like we should have some
CoglFramebuffer api to associate a frame time.

I seems like it could be ok to add
cogl_framebuffer_set/get_frame_time() functions for this and in
cogl_onscreen_swap_buffers we can copy the timestamp into the
FrameInfo too.

kind regards,
- Robert


More information about the Cogl mailing list