xorg: work on codec mode
This commit is contained in:
parent
dcc7dd3097
commit
9a4a4d021f
@ -1873,6 +1873,10 @@ rdpClientConSendPaintRectShmEx(rdpPtr dev, rdpClientCon *clientCon,
|
|||||||
int size;
|
int size;
|
||||||
int num_rects_d;
|
int num_rects_d;
|
||||||
int num_rects_c;
|
int num_rects_c;
|
||||||
|
short x;
|
||||||
|
short y;
|
||||||
|
short cx;
|
||||||
|
short cy;
|
||||||
struct stream *s;
|
struct stream *s;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
@ -1880,6 +1884,11 @@ rdpClientConSendPaintRectShmEx(rdpPtr dev, rdpClientCon *clientCon,
|
|||||||
|
|
||||||
num_rects_d = REGION_NUM_RECTS(dirtyReg);
|
num_rects_d = REGION_NUM_RECTS(dirtyReg);
|
||||||
num_rects_c = REGION_NUM_RECTS(copyReg);
|
num_rects_c = REGION_NUM_RECTS(copyReg);
|
||||||
|
if ((num_rects_c < 1) || (num_rects_d < 1))
|
||||||
|
{
|
||||||
|
LLOGLN(0, ("rdpClientConSendPaintRectShmEx: nothing to send"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
size = 2 + 2 + 2 + num_rects_d * 8 + 2 + num_rects_c * 8;
|
size = 2 + 2 + 2 + num_rects_d * 8 + 2 + num_rects_c * 8;
|
||||||
size += 4 + 4 + 4 + 4 + 2 + 2;
|
size += 4 + 4 + 4 + 4 + 2 + 2;
|
||||||
rdpClientConPreCheck(dev, clientCon, size);
|
rdpClientConPreCheck(dev, clientCon, size);
|
||||||
@ -1893,20 +1902,28 @@ rdpClientConSendPaintRectShmEx(rdpPtr dev, rdpClientCon *clientCon,
|
|||||||
for (index = 0; index < num_rects_d; index++)
|
for (index = 0; index < num_rects_d; index++)
|
||||||
{
|
{
|
||||||
box = REGION_RECTS(dirtyReg)[index];
|
box = REGION_RECTS(dirtyReg)[index];
|
||||||
out_uint16_le(s, box.x1);
|
x = box.x1;
|
||||||
out_uint16_le(s, box.y1);
|
y = box.y1;
|
||||||
out_uint16_le(s, box.x2 - box.x1);
|
cx = box.x2 - box.x1;
|
||||||
out_uint16_le(s, box.y2 - box.y1);
|
cy = box.y2 - box.y1;
|
||||||
|
out_uint16_le(s, x);
|
||||||
|
out_uint16_le(s, y);
|
||||||
|
out_uint16_le(s, cx);
|
||||||
|
out_uint16_le(s, cy);
|
||||||
}
|
}
|
||||||
|
|
||||||
out_uint16_le(s, num_rects_c);
|
out_uint16_le(s, num_rects_c);
|
||||||
for (index = 0; index < num_rects_c; index++)
|
for (index = 0; index < num_rects_c; index++)
|
||||||
{
|
{
|
||||||
box = REGION_RECTS(copyReg)[index];
|
box = REGION_RECTS(copyReg)[index];
|
||||||
out_uint16_le(s, box.x1);
|
x = box.x1;
|
||||||
out_uint16_le(s, box.y1);
|
y = box.y1;
|
||||||
out_uint16_le(s, box.x2 - box.x1);
|
cx = box.x2 - box.x1;
|
||||||
out_uint16_le(s, box.y2 - box.y1);
|
cy = box.y2 - box.y1;
|
||||||
|
out_uint16_le(s, x);
|
||||||
|
out_uint16_le(s, y);
|
||||||
|
out_uint16_le(s, cx);
|
||||||
|
out_uint16_le(s, cy);
|
||||||
}
|
}
|
||||||
|
|
||||||
out_uint32_le(s, 0);
|
out_uint32_le(s, 0);
|
||||||
@ -1933,11 +1950,14 @@ rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
|
|||||||
LLOGLN(10, ("rdpDeferredUpdateCallback:"));
|
LLOGLN(10, ("rdpDeferredUpdateCallback:"));
|
||||||
clientCon = (rdpClientCon *) arg;
|
clientCon = (rdpClientCon *) arg;
|
||||||
|
|
||||||
if (clientCon->rect_id != clientCon->rect_id_ack)
|
if (clientCon->rect_id > clientCon->rect_id_ack)
|
||||||
{
|
{
|
||||||
LLOGLN(0, ("rdpDeferredUpdateCallback: reschedual"));
|
LLOGLN(0, ("rdpDeferredUpdateCallback: reschedual rect_id %d "
|
||||||
|
"rect_id_ack %d",
|
||||||
|
clientCon->rect_id, clientCon->rect_id_ack));
|
||||||
clientCon->updateTimer = TimerSet(clientCon->updateTimer, 0, 40,
|
clientCon->updateTimer = TimerSet(clientCon->updateTimer, 0, 40,
|
||||||
rdpDeferredUpdateCallback, clientCon);
|
rdpDeferredUpdateCallback,
|
||||||
|
clientCon);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -89,8 +89,6 @@ struct _rdpClientCon
|
|||||||
struct font_cache font_cache[12][256];
|
struct font_cache font_cache[12][256];
|
||||||
int font_stamp;
|
int font_stamp;
|
||||||
|
|
||||||
RegionPtr dirtyRegion;
|
|
||||||
|
|
||||||
struct xrdp_client_info client_info;
|
struct xrdp_client_info client_info;
|
||||||
|
|
||||||
char *shmemptr;
|
char *shmemptr;
|
||||||
@ -103,6 +101,8 @@ struct _rdpClientCon
|
|||||||
OsTimerPtr updateTimer;
|
OsTimerPtr updateTimer;
|
||||||
int updateSchedualed; /* boolean */
|
int updateSchedualed; /* boolean */
|
||||||
|
|
||||||
|
RegionPtr dirtyRegion;
|
||||||
|
|
||||||
struct _rdpClientCon *next;
|
struct _rdpClientCon *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user