summaryrefslogtreecommitdiffstats
path: root/vncviewer/Viewport.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2014-02-06 16:31:10 +0100
committerPierre Ossman <ossman@cendio.se>2014-07-07 14:55:27 +0200
commita32040d7c9972f70272218effbc0242416d417d2 (patch)
treeb6ef6c797262da99af6907154b014a65acb15b60 /vncviewer/Viewport.cxx
parent2e5a10608394186fd1324c97b17d7f08e0c0aaf6 (diff)
downloadtigervnc-a32040d7c9972f70272218effbc0242416d417d2.tar.gz
tigervnc-a32040d7c9972f70272218effbc0242416d417d2.zip
Provide a better R/W base PixelBuffer class
Clearly separates the read API from the write API and also from actual implementation.
Diffstat (limited to 'vncviewer/Viewport.cxx')
-rw-r--r--vncviewer/Viewport.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index d1d51622..70964b76 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -229,6 +229,7 @@ void Viewport::imageRect(const rfb::Rect& r, void* pixels) {
pixelTrans->translateRect(pixels, r.width(),
rfb::Rect(0, 0, r.width(), r.height()),
buffer, stride, rfb::Point(0, 0));
+ frameBuffer->commitBufferRW(r);
} else {
frameBuffer->imageRect(r, pixels);
}
@@ -244,6 +245,11 @@ rdr::U8* Viewport::getBufferRW(const rfb::Rect& r, int* stride) {
return frameBuffer->getBufferRW(r, stride);
}
+void Viewport::commitBufferRW(const rfb::Rect& r) {
+ frameBuffer->commitBufferRW(r);
+ damageRect(r);
+}
+
void Viewport::damageRect(const rfb::Rect& r) {
damage.assign_union(rfb::Region(r));
if (!Fl::has_timeout(handleUpdateTimeout, this))