From 0c9bd4b0ba28f5aab8b1f3e2eb8d83e01915e2b8 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 9 Jul 2014 16:44:11 +0200 Subject: 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. --- vncviewer/PlatformPixelBuffer.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vncviewer/PlatformPixelBuffer.h') diff --git a/vncviewer/PlatformPixelBuffer.h b/vncviewer/PlatformPixelBuffer.h index 03842ac8..21b93be4 100644 --- a/vncviewer/PlatformPixelBuffer.h +++ b/vncviewer/PlatformPixelBuffer.h @@ -20,14 +20,20 @@ #define __PLATFORMPIXELBUFFER_H__ #include +#include class PlatformPixelBuffer: public rfb::FullFramePixelBuffer { public: PlatformPixelBuffer(const rfb::PixelFormat& pf, int width, int height, rdr::U8* data, int stride); + virtual void commitBufferRW(const rfb::Rect& r); + virtual void draw(int src_x, int src_y, int x, int y, int w, int h) = 0; + rfb::Rect getDamage(void); +protected: + rfb::Region damage; }; #endif -- cgit v1.2.3