]> source.dussan.org Git - tigervnc.git/commitdiff
Sending updates for "video area".
authorConstantin Kaplinsky <const@tightvnc.com>
Mon, 3 Sep 2007 04:23:48 +0000 (04:23 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Mon, 3 Sep 2007 04:23:48 +0000 (04:23 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2331 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/VNCSConnectionST.cxx
common/rfb/VNCServer.h
common/rfb/VNCServerST.h

index 5237c1b4d67fa5c5a26495a19cb6bafc8ff52df4..d6541f9738ea5597f375fc267fc97448f6e8138b 100644 (file)
@@ -646,9 +646,7 @@ void VNCSConnectionST::writeFramebufferUpdate()
     // complicated as compared to the original VNC4.
     writer()->setupCurrentEncoder();
     int nRects = (ui.copied.numRects() +
-                  /* FIXME: Sending video area is not yet enabled.
                   (ui.video_area.is_empty() ? 0 : 1) +
-                  */
                   (drawRenderedCursor ? 1 : 0));
     std::vector<Rect> rects;
     std::vector<Rect>::const_iterator i;
@@ -659,6 +657,8 @@ void VNCSConnectionST::writeFramebufferUpdate()
     }
     
     writer()->writeFramebufferUpdateStart(nRects);
+    if (!ui.video_area.is_empty())
+      writer()->writeVideoRect(server->getPixelBuffer(), ui.video_area);
     Region updatedRegion;
     writer()->writeRects(ui, &image_getter, &updatedRegion);
     updates.subtract(updatedRegion);
index df0fb0e5a70d154e59ec6c0cb5b8e4d391193511..1e7acc63f72f6adcd578384a15744820bb2637da 100644 (file)
@@ -35,6 +35,9 @@ namespace rfb {
     // protocol messages being sent, or clients being disconnected.
     virtual void setPixelBuffer(PixelBuffer* pb) = 0;
 
+    // getPixelBuffer() returns a pointer to the PixelBuffer object.
+    virtual PixelBuffer* getPixelBuffer() const = 0;
+
     // setColourMapEntries() tells the server that some entries in the colour
     // map have changed.  The server will retrieve them via the PixelBuffer's
     // ColourMap object.  This may result in protocol messages being sent.
index 37b75eafaddf8746180747058530489f7b7b575b..fad8cb930af69be468f074c37d57c52a4ee657fd 100644 (file)
@@ -79,6 +79,7 @@ namespace rfb {
     // Methods overridden from VNCServer
 
     virtual void setPixelBuffer(PixelBuffer* pb);
+    virtual PixelBuffer* getPixelBuffer() const { return pb; }
     virtual void setColourMapEntries(int firstColour=0, int nColours=0);
     virtual void serverCutText(const char* str, int len);
     virtual void add_changed(const Region &region);