mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[host] capture: add damage rectangles to capture interface
This commit is contained in:
parent
69b20aee05
commit
80ab4b5393
@ -23,6 +23,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "common/framebuffer.h"
|
#include "common/framebuffer.h"
|
||||||
|
#include "common/KVMFR.h"
|
||||||
|
|
||||||
typedef enum CaptureResult
|
typedef enum CaptureResult
|
||||||
{
|
{
|
||||||
@ -69,6 +70,8 @@ typedef struct CaptureFrame
|
|||||||
unsigned int stride;
|
unsigned int stride;
|
||||||
CaptureFormat format;
|
CaptureFormat format;
|
||||||
CaptureRotation rotation;
|
CaptureRotation rotation;
|
||||||
|
uint32_t damageRectsCount;
|
||||||
|
FrameDamageRect damageRects[KVMFR_MAX_DAMAGE_RECTS];
|
||||||
}
|
}
|
||||||
CaptureFrame;
|
CaptureFrame;
|
||||||
|
|
||||||
|
@ -239,6 +239,9 @@ static bool sendFrame(void)
|
|||||||
fi->blockScreensaver = os_blockScreensaver();
|
fi->blockScreensaver = os_blockScreensaver();
|
||||||
app.frameValid = true;
|
app.frameValid = true;
|
||||||
|
|
||||||
|
fi->damageRectsCount = frame.damageRectsCount;
|
||||||
|
memcpy(fi->damageRects, frame.damageRects, frame.damageRectsCount * sizeof(FrameDamageRect));
|
||||||
|
|
||||||
// put the framebuffer on the border of the next page
|
// put the framebuffer on the border of the next page
|
||||||
// this is to allow for aligned DMA transfers by the receiver
|
// this is to allow for aligned DMA transfers by the receiver
|
||||||
FrameBuffer * fb = (FrameBuffer *)(((uint8_t*)fi) + fi->offset);
|
FrameBuffer * fb = (FrameBuffer *)(((uint8_t*)fi) + fi->offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user