Skip to content

Commit

Permalink
configure logging and timer changes (#274)
Browse files Browse the repository at this point in the history
* configure.ac change for shm_open

* RFX capture, remove extra logging

* call rdpScheduleDeferredUpdate on frame ack instead of polling
  • Loading branch information
jsorg71 authored Jan 25, 2024
1 parent 26b41d7 commit b93ad93
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ if test "x${with_simd}" != "xno"; then
fi
fi

# shm_open may not be in the C library
AC_SEARCH_LIBS([shm_open], [rt])

AC_ARG_ENABLE(glamor, AS_HELP_STRING([--enable-glamor],
[Use glamor(requires xorg server 1.19+) (default: no)]),
[], [enable_glamor=no])
Expand Down
2 changes: 1 addition & 1 deletion module/rdpCapture.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ rdpCapture2(rdpClientCon *clientCon, RegionPtr in_reg, BoxPtr *out_rects,

if (rcode == rgnOUT)
{
LLOGLN(0, ("rdpCapture2: rgnOUT"));
LLOGLN(10, ("rdpCapture2: rgnOUT"));
rdpRegionInit(&tile_reg, &rect, 0);
rdpRegionSubtract(in_reg, in_reg, &tile_reg);
rdpRegionUninit(&tile_reg);
Expand Down
23 changes: 7 additions & 16 deletions module/rdpClientCon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ rdpClientConProcessMsgClientRegion(rdpPtr dev, rdpClientCon *clientCon)
box.x1, box.y1, box.x2, box.y2));
rdpRegionSubtract(clientCon->shmRegion, clientCon->shmRegion, &reg);
rdpRegionUninit(&reg);

rdpScheduleDeferredUpdate(clientCon);
return 0;
}

Expand All @@ -1202,6 +1202,7 @@ rdpClientConProcessMsgClientRegionEx(rdpPtr dev, rdpClientCon *clientCon)
LLOGLN(10, ("rdpClientConProcessMsgClientRegionEx: flags 0x%8.8x", flags));
LLOGLN(10, ("rdpClientConProcessMsgClientRegionEx: rect_id %d "
"rect_id_ack %d", clientCon->rect_id, clientCon->rect_id_ack));
rdpScheduleDeferredUpdate(clientCon);
return 0;
}

Expand Down Expand Up @@ -2629,8 +2630,6 @@ rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
LLOGLN(10, ("rdpDeferredUpdateCallback:"));
clientCon = (rdpClientCon *) arg;
clientCon->updateScheduled = FALSE;
clientCon->lastUpdateTime = now;

if (clientCon->suppress_output)
{
LLOGLN(10, ("rdpDeferredUpdateCallback: suppress_output set"));
Expand All @@ -2647,12 +2646,9 @@ rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
/* do not allow captures until we have the client_info */
clientCon->client_info.size == 0)
{
LLOGLN(10, ("rdpDeferredUpdateCallback: reschedule rect_id %d "
"rect_id_ack %d",
clientCon->rect_id, clientCon->rect_id_ack));
rdpScheduleDeferredUpdate(clientCon);
return 0;
}
clientCon->lastUpdateTime = now;
LLOGLN(10, ("rdpDeferredUpdateCallback: sending"));
clientCon->updateRetries = 0;
rdpClientConGetScreenImageRect(clientCon->dev, clientCon, &id);
Expand Down Expand Up @@ -2758,11 +2754,9 @@ rdpScheduleDeferredUpdate(rdpClientCon *clientCon)
uint32_t msToWait;
uint32_t minNextUpdateTime;

if (clientCon->updateRetries > UPDATE_RETRY_TIMEOUT) {
LLOGLN(10, ("rdpScheduleDeferredUpdate: clientCon->updateRetries is %d"
" and has exceeded the timeout of %d retries."
" Overriding rect_id_ack to INT_MAX.", clientCon->updateRetries, UPDATE_RETRY_TIMEOUT));
clientCon->rect_id_ack = INT_MAX;
if (clientCon->updateScheduled)
{
return;
}

curTime = (uint32_t) GetTimeInMillis();
Expand Down Expand Up @@ -2794,10 +2788,7 @@ rdpClientConAddDirtyScreenReg(rdpPtr dev, rdpClientCon *clientCon,
{
LLOGLN(10, ("rdpClientConAddDirtyScreenReg:"));
rdpRegionUnion(clientCon->dirtyRegion, clientCon->dirtyRegion, reg);
if (clientCon->updateScheduled == FALSE)
{
rdpScheduleDeferredUpdate(clientCon);
}
rdpScheduleDeferredUpdate(clientCon);
return 0;
}

Expand Down

0 comments on commit b93ad93

Please sign in to comment.