Skip to content

Commit

Permalink
feature: add isNSCodec()
Browse files Browse the repository at this point in the history
  • Loading branch information
unstabler committed Feb 4, 2023
1 parent 877b1cc commit 1e20ccc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions XrdpUlalacaPrivate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int XrdpUlalacaPrivate::decideCopyRectSize() const {
return 64;
}

if (isH264Codec() || isGFXH264Codec()) {
if (isNSCodec() || isH264Codec() || isGFXH264Codec()) {
// ??? FIXME
return RECT_SIZE_BYPASS_CREATE;
}
Expand Down Expand Up @@ -174,6 +174,7 @@ void XrdpUlalacaPrivate::updateThreadLoop() {
continue;
}


auto width = update.width;
auto height = update.height;
auto dirtyRects = update.dirtyRects;
Expand All @@ -194,7 +195,7 @@ void XrdpUlalacaPrivate::updateThreadLoop() {
ULIPCRect screenRect {0, 0, (short) width, (short) height};
auto copyRectSize = decideCopyRectSize();

if (_frameId > 0 || !_fullInvalidate) {
if ((_frameId > 0 && !_fullInvalidate) || isNSCodec()) {
auto copyRects = createCopyRects(*dirtyRects, copyRectSize);

_mod->server_paint_rects(
Expand Down Expand Up @@ -250,6 +251,10 @@ void XrdpUlalacaPrivate::calculateSessionSize() {
_sessionSize = _screenLayouts.front();
}

bool XrdpUlalacaPrivate::isNSCodec() const {
return _clientInfo.ns_codec_id != 0;
}

bool XrdpUlalacaPrivate::isRFXCodec() const {
return _clientInfo.rfx_codec_id != 0;
}
Expand All @@ -267,7 +272,7 @@ bool XrdpUlalacaPrivate::isGFXH264Codec() const {
}

bool XrdpUlalacaPrivate::isRawBitmap() const {
return !(isRFXCodec() || isJPEGCodec() || isH264Codec() || isGFXH264Codec());
return !(isNSCodec() || isRFXCodec() || isJPEGCodec() || isH264Codec() || isGFXH264Codec());
}


0 comments on commit 1e20ccc

Please sign in to comment.