Skip to content

WGC CaptureFrame returns wrong SystemRelativeTime in window capture mode #127

@artths

Description

@artths

Using the Desktop Duplication API, I can compare dirty rects with the coordinates of the window I'm interested in, and having the present time of the frame update, I know exactly when the frame in this window was updated.

When using WGC to capture the window I'm interested in, for some reason I get frame updates every time the DWM updates, why if I capture a single window? Well OK, let it be so, if only the frame time contained in the captured frame corresponded specifically to the update time of this window, and not DWM in general.

The documentation says:

SystemRelativeTime
The QPC (Query Performance Counter) time at which the compositor rendered the frame.

If we capture only a specific window, then the refresh time of the frame should also refer to that window, not the other windows on desktop, right? I don't know if it's by design or if it's a bug, but there's no way to tell when exactly a new frame arrived so you might end up with a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions