mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 22:01:46 +00:00
[host] capture: pass frameIndex to capture backends
This allows capture backends to track damage made to each frame.
This commit is contained in:
parent
f274bec8fc
commit
9ce4990793
5 changed files with 6 additions and 5 deletions
|
@ -112,6 +112,6 @@ typedef struct CaptureInterface
|
||||||
|
|
||||||
CaptureResult (*capture )();
|
CaptureResult (*capture )();
|
||||||
CaptureResult (*waitFrame )(CaptureFrame * frame, const size_t maxFrameSize);
|
CaptureResult (*waitFrame )(CaptureFrame * frame, const size_t maxFrameSize);
|
||||||
CaptureResult (*getFrame )(FrameBuffer * frame, const unsigned int height);
|
CaptureResult (*getFrame )(FrameBuffer * frame, const unsigned int height, int frameIndex);
|
||||||
}
|
}
|
||||||
CaptureInterface;
|
CaptureInterface;
|
||||||
|
|
|
@ -213,7 +213,8 @@ static CaptureResult xcb_waitFrame(CaptureFrame * frame,
|
||||||
return CAPTURE_RESULT_OK;
|
return CAPTURE_RESULT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CaptureResult xcb_getFrame(FrameBuffer * frame, const unsigned int height)
|
static CaptureResult xcb_getFrame(FrameBuffer * frame,
|
||||||
|
const unsigned int height, int frameIndex)
|
||||||
{
|
{
|
||||||
assert(this);
|
assert(this);
|
||||||
assert(this->initialized);
|
assert(this->initialized);
|
||||||
|
|
|
@ -1027,7 +1027,7 @@ static CaptureResult dxgi_waitFrame(CaptureFrame * frame, const size_t maxFrameS
|
||||||
}
|
}
|
||||||
|
|
||||||
static CaptureResult dxgi_getFrame(FrameBuffer * frame,
|
static CaptureResult dxgi_getFrame(FrameBuffer * frame,
|
||||||
const unsigned int height)
|
const unsigned int height, int frameIndex)
|
||||||
{
|
{
|
||||||
assert(this);
|
assert(this);
|
||||||
assert(this->initialized);
|
assert(this->initialized);
|
||||||
|
|
|
@ -428,7 +428,7 @@ static CaptureResult nvfbc_waitFrame(CaptureFrame * frame,
|
||||||
}
|
}
|
||||||
|
|
||||||
static CaptureResult nvfbc_getFrame(FrameBuffer * frame,
|
static CaptureResult nvfbc_getFrame(FrameBuffer * frame,
|
||||||
const unsigned int height)
|
const unsigned int height, int frameIndex)
|
||||||
{
|
{
|
||||||
framebuffer_write(
|
framebuffer_write(
|
||||||
frame,
|
frame,
|
||||||
|
|
|
@ -254,7 +254,7 @@ static bool sendFrame(void)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
app.iface->getFrame(fb, frame.height);
|
app.iface->getFrame(fb, frame.height, app.frameIndex);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue