summaryrefslogtreecommitdiffstats
path: root/vncviewer/Viewport.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2014-07-09 16:44:11 +0200
committerPierre Ossman <ossman@cendio.se>2014-07-14 16:03:41 +0200
commit0c9bd4b0ba28f5aab8b1f3e2eb8d83e01915e2b8 (patch)
tree500f61ee230d30fa1f8e955214c698e86b69e2f4 /vncviewer/Viewport.h
parent126e56420e47d72cc950d03976ee57d1efda436e (diff)
downloadtigervnc-0c9bd4b0ba28f5aab8b1f3e2eb8d83e01915e2b8.tar.gz
tigervnc-0c9bd4b0ba28f5aab8b1f3e2eb8d83e01915e2b8.zip
Use PixelBuffer objects as the interface for encoders and decoders
This avoid a lot of unnecessary middle men. This also pushes the responsibility for pixel format conversion into the encoders and decoders. The new bufferFromBuffer() is used for direct conversion, rather than PixelTransformer/TransImageGetter.
Diffstat (limited to 'vncviewer/Viewport.h')
-rw-r--r--vncviewer/Viewport.h24
1 files changed, 5 insertions, 19 deletions
diff --git a/vncviewer/Viewport.h b/vncviewer/Viewport.h
index e112efda..0523cd14 100644
--- a/vncviewer/Viewport.h
+++ b/vncviewer/Viewport.h
@@ -22,10 +22,9 @@
#include <map>
-#include <FL/Fl_Widget.H>
+namespace rfb { class ModifiablePixelBuffer; }
-#include <rfb/Region.h>
-#include <rfb/Pixel.h>
+#include <FL/Fl_Widget.H>
class Fl_Menu_Button;
class Fl_RGB_Image;
@@ -41,23 +40,16 @@ public:
Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_);
~Viewport();
- // PixelFormat of incoming write operations
- void setServerPF(const rfb::PixelFormat& pf);
// Most efficient format (from Viewport's point of view)
const rfb::PixelFormat &getPreferredPF();
// Flush updates to screen
void updateWindow();
- // Methods forwarded from CConn
-
- void fillRect(const rfb::Rect& r, rfb::Pixel pix);
- void imageRect(const rfb::Rect& r, void* pixels);
- void copyRect(const rfb::Rect& r, int srcX, int srcY);
-
- rdr::U8* getBufferRW(const rfb::Rect& r, int* stride);
- void commitBufferRW(const rfb::Rect& r);
+ // Return a pointer to the framebuffer for decoders to write into
+ rfb::ModifiablePixelBuffer* getFramebuffer(void);
+ // New image for the locally rendered cursor
void setCursor(int width, int height, const rfb::Point& hotspot,
void* data, void* mask);
@@ -71,12 +63,8 @@ public:
private:
- void damageRect(const rfb::Rect& r);
-
PlatformPixelBuffer* createFramebuffer(int w, int h);
- static void handleUpdateTimeout(void *data);
-
static void handleClipboardChange(int source, void *data);
void handlePointerEvent(const rfb::Point& pos, int buttonMask);
@@ -96,8 +84,6 @@ private:
CConn* cc;
PlatformPixelBuffer* frameBuffer;
- rfb::PixelTransformer *pixelTrans;
- rfb::Region damage;
rfb::Point lastPointerPos;
int lastButtonMask;