Cogl.FrameInfo

g Cogl.FrameInfo Cogl.FrameInfo Cogl.Object Cogl.Object Cogl.Object->Cogl.FrameInfo

Subclasses:

None

Methods

Inherited:

Cogl.Object (2)

get_frame_counter ()

get_output ()

get_presentation_time ()

get_refresh_rate ()

Virtual Methods

None

Fields

None

Class Details

class Cogl.FrameInfo
Bases:

Cogl.Object

Abstract:

No

get_frame_counter()
Returns:

The frame counter value

Return type:

int

Gets the frame counter for the Cogl.Onscreen that corresponds to this frame.

New in version 1.14.

get_output()
Returns:

The Cogl.Output that the frame was presented to, or None if this could not be determined.

Return type:

Cogl.Output

Gets the Cogl.Output that the swapped frame was presented to.

New in version 1.14.

get_presentation_time()
Returns:

the presentation time for the frame

Return type:

int

Gets the presentation time for the frame. This is the time at which the frame became visible to the user.

The presentation time measured in nanoseconds is based on a monotonic time source. The time source is not necessarily correlated with system/wall clock time and may represent the time elapsed since some undefined system event such as when the system last booted.

Linux kernel version less that 3.8 can result in non-monotonic timestamps being reported when using a drm based OpenGL driver. Also some buggy Mesa drivers up to 9.0.1 may also incorrectly report non-monotonic timestamps.

New in version 1.14.

get_refresh_rate()
Returns:

the refresh rate in Hertz

Return type:

float

Gets the refresh rate in Hertz for the output that the frame was on at the time the frame was presented.

Some platforms can’t associate a Cogl.Output with a Cogl.FrameInfo object but are able to report a refresh rate via this api. Therefore if you need this information then this api is more reliable than using Cogl.FrameInfo.get_output() followed by Cogl.Output.get_refresh_rate().

New in version 1.14.