pendingPFChange(false),
currentEncoding(encodingTight), lastServerEncoding((unsigned int)-1),
formatChange(false), encodingChange(false),
- firstUpdate(true), pendingUpdate(false),
+ firstUpdate(true), pendingUpdate(false), continuousUpdates(false),
forceNonincremental(true), supportsSyncFence(false)
{
setShared(::shared);
if (firstUpdate) {
int width, height;
- // We need fences to make extra update requests "safe".
- // See fence() for the next step.
+ // We need fences to make extra update requests and continuous
+ // updates "safe". See fence() for the next step.
if (cp.supportsFence)
writer()->writeFence(fenceFlagRequest | fenceFlagSyncNext, 0, NULL);
if (len == 0) {
// Initial probe
- if (flags & fenceFlagSyncNext)
+ if (flags & fenceFlagSyncNext) {
supportsSyncFence = true;
+
+ if (cp.supportsContinuousUpdates) {
+ vlog.info(_("Enabling continuous updates"));
+ continuousUpdates = true;
+ writer()->writeEnableContinuousUpdates(true, 0, 0, cp.width, cp.height);
+ }
+ }
} else {
// Pixel format change
rdr::MemInStream memStream(data, len);
if (!desktop)
return;
+ if (continuousUpdates)
+ writer()->writeEnableContinuousUpdates(true, 0, 0, cp.width, cp.height);
+
desktop->resizeFramebuffer(cp.width, cp.height);
}
checkEncodings();
- pendingUpdate = true;
- writer()->writeFramebufferUpdateRequest(Rect(0, 0, cp.width, cp.height),
- !forceNonincremental);
+ if (forceNonincremental || !continuousUpdates) {
+ pendingUpdate = true;
+ writer()->writeFramebufferUpdateRequest(Rect(0, 0, cp.width, cp.height),
+ !forceNonincremental);
+ }
forceNonincremental = false;
}