diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-07-09 16:44:11 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-07-14 16:03:41 +0200 |
commit | 0c9bd4b0ba28f5aab8b1f3e2eb8d83e01915e2b8 (patch) | |
tree | 500f61ee230d30fa1f8e955214c698e86b69e2f4 /vncviewer/DesktopWindow.h | |
parent | 126e56420e47d72cc950d03976ee57d1efda436e (diff) | |
download | tigervnc-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/DesktopWindow.h')
-rw-r--r-- | vncviewer/DesktopWindow.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/vncviewer/DesktopWindow.h b/vncviewer/DesktopWindow.h index 83a8c767..8b91450f 100644 --- a/vncviewer/DesktopWindow.h +++ b/vncviewer/DesktopWindow.h @@ -27,6 +27,8 @@ #include <FL/Fl_Window.H> +namespace rfb { class ModifiablePixelBuffer; } + class CConn; class Viewport; @@ -39,26 +41,22 @@ public: const rfb::PixelFormat& serverPF, CConn* cc_); ~DesktopWindow(); - // PixelFormat of incoming write operations - void setServerPF(const rfb::PixelFormat& pf); // Most efficient format (from DesktopWindow's point of view) const rfb::PixelFormat &getPreferredPF(); // Flush updates to screen void updateWindow(); - // Methods forwarded from CConn + // Updated session title void setName(const char *name); - 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); + // Resize the current framebuffer, but retain the contents void resizeFramebuffer(int new_w, int new_h); + // New image for the locally rendered cursor void setCursor(int width, int height, const rfb::Point& hotspot, void* data, void* mask); |