mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-04 06:12:04 +00:00
[client/host/idd] correct frame timing attribution
Use calibrated copy-queue timestamps to separate source and effect waits from the actual framebuffer copy. Exclude producer readiness waits from client import timing so the same interval is not counted in both Copy and Import.
This commit is contained in:
@@ -44,6 +44,13 @@ typedef bool (*FrameBufferReadFn)(void * opaque, const void * src, size_t size);
|
||||
*/
|
||||
bool framebuffer_wait(const FrameBuffer * frame, size_t size);
|
||||
|
||||
/**
|
||||
* Wait for the framebuffer to fill to the specified size and accumulate the
|
||||
* nanoseconds spent waiting for the producer in `waitTimeNs`.
|
||||
*/
|
||||
bool framebuffer_wait_timed(const FrameBuffer * frame, size_t size,
|
||||
uint64_t * waitTimeNs);
|
||||
|
||||
/**
|
||||
* Read `size` bytes from the KVMFRFrame into the dst buffer
|
||||
*/
|
||||
@@ -56,6 +63,14 @@ bool framebuffer_read_linear(const FrameBuffer * frame, void * restrict dst,
|
||||
bool framebuffer_read(const FrameBuffer * frame, void * dst, size_t dstpitch,
|
||||
size_t height, size_t width, size_t bpp, size_t pitch);
|
||||
|
||||
/**
|
||||
* Read data from the KVMFRFrame and accumulate the nanoseconds spent waiting
|
||||
* for the producer in `waitTimeNs`.
|
||||
*/
|
||||
bool framebuffer_read_timed(const FrameBuffer * frame, void * dst,
|
||||
size_t dstpitch, size_t height, size_t width, size_t bpp, size_t pitch,
|
||||
uint64_t * waitTimeNs);
|
||||
|
||||
/**
|
||||
* Read data from the KVMFRFrame using a callback
|
||||
*/
|
||||
|
||||
@@ -39,6 +39,11 @@ bool rectsFramebufferToBuffer(FrameDamageRect * rects, int count, int bpp,
|
||||
uint8_t * dst, int dstPitch, int height,
|
||||
const FrameBuffer * frame, int srcPitch);
|
||||
|
||||
/* As above, accumulating producer wait time in nanoseconds. */
|
||||
bool rectsFramebufferToBufferTimed(FrameDamageRect * rects, int count, int bpp,
|
||||
uint8_t * dst, int dstPitch, int height,
|
||||
const FrameBuffer * frame, int srcPitch, uint64_t * waitTimeNs);
|
||||
|
||||
int rectsMergeOverlapping(FrameDamageRect * rects, int count);
|
||||
int rectsRejectContained(FrameDamageRect * rects, int count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user