vnc: Optimize and simplify repainting
ClosedPublic

Authored by volkov on May 9 2019, 12:14 PM.

Details

Summary

Use qreal version of QPainter::drawImage() with the
QPainter::SmoothPixmapTransform flag instead of
QImage::copy() -> QImage::scaled() -> QPainter::drawImage()
chain. This is much faster and allows to avoid artifacts
caused by rounding and the Qt::IgnoreAspectRatio flag.
The only drawback of the new approach is that the result
is worse when the image is downscaled by a factor greater
than 2 (QTBUG-42330), but this is not critical.

Also don't process separately repaints caused by a server.
The only reason for this was to avoid extra rounding of
coordinates, but with this change rounding is not needed
at all.

Diff Detail

Repository
R436 KRDC
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11687
Build 11705: arc lint + arc unit
volkov requested review of this revision.May 9 2019, 12:14 PM
volkov created this revision.
volkov edited the summary of this revision. (Show Details)May 9 2019, 4:06 PM
aacid accepted this revision.Jun 9 2019, 10:20 PM
aacid added a subscriber: aacid.

Please add the two suggested const and commit :)

vnc/vncview.cpp
540

const

541

const

This revision is now accepted and ready to land.Jun 9 2019, 10:20 PM
volkov closed this revision.Jun 10 2019, 10:44 AM