Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions src/libvncserver/tight.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,12 +820,7 @@ SendMonoRect(rfbClientPtr cl,
dataLen = (w + 7) / 8;
dataLen *= h;

if (tightConf[cl->tightCompressLevel].monoZlibLevel == 0 &&
cl->tightEncoding != rfbEncodingTightPng)
cl->updateBuf[cl->ublen++] =
(char)((rfbTightNoZlib | rfbTightExplicitFilter) << 4);
else
cl->updateBuf[cl->ublen++] = (streamId | rfbTightExplicitFilter) << 4;
cl->updateBuf[cl->ublen++] = (streamId | rfbTightExplicitFilter) << 4;
cl->updateBuf[cl->ublen++] = rfbTightFilterPalette;
cl->updateBuf[cl->ublen++] = 1;

Expand Down Expand Up @@ -897,12 +892,7 @@ SendIndexedRect(palettePtr palette,
}

/* Prepare tight encoding header. */
if (tightConf[cl->tightCompressLevel].idxZlibLevel == 0 &&
cl->tightEncoding != rfbEncodingTightPng)
cl->updateBuf[cl->ublen++] =
(char)((rfbTightNoZlib | rfbTightExplicitFilter) << 4);
else
cl->updateBuf[cl->ublen++] = (streamId | rfbTightExplicitFilter) << 4;
cl->updateBuf[cl->ublen++] = (streamId | rfbTightExplicitFilter) << 4;
cl->updateBuf[cl->ublen++] = rfbTightFilterPalette;
cl->updateBuf[cl->ublen++] = (char)(palette->numColors - 1);

Expand Down Expand Up @@ -973,11 +963,7 @@ SendFullColorRect(rfbClientPtr cl,
return FALSE;
}

if (tightConf[cl->tightCompressLevel].rawZlibLevel == 0 &&
cl->tightEncoding != rfbEncodingTightPng)
cl->updateBuf[cl->ublen++] = (char)(rfbTightNoZlib << 4);
else
cl->updateBuf[cl->ublen++] = 0x00; /* stream id = 0, no flushing, no filter */
cl->updateBuf[cl->ublen++] = 0x00; /* stream id = 0, no flushing, no filter */
rfbStatRecordEncodingSentAdd(cl, cl->tightEncoding, 1);

if (cl->tightUsePixelFormat24) {
Expand Down Expand Up @@ -1008,9 +994,6 @@ CompressData(rfbClientPtr cl,
return TRUE;
}

if (zlibLevel == 0)
return rfbSendCompressedDataTight(cl, cl->beforeEncBuf, dataLen);

pz = &cl->zsStruct[streamId];

/* Initialize compression stream if needed. */
Expand Down
Loading