From 98d91203c5d2f6f7249f38941466857b6a566f5d Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 19 Apr 2010 16:19:43 +0200 Subject: Make client canvas and pixmaps handle more formats and simplify We now support 16bit format pixmaps as well as the old ones. Including both 555 and 565 modes. We drop the palette argument for pixmap construction as it was only used for black/white anyway. Canvas creation is simplified so that there is no separate set_mode state. Canvases are already created in the right mode and never change. --- client/red_gdi_canvas.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'client/red_gdi_canvas.h') diff --git a/client/red_gdi_canvas.h b/client/red_gdi_canvas.h index d117282b..643f3c6c 100644 --- a/client/red_gdi_canvas.h +++ b/client/red_gdi_canvas.h @@ -27,11 +27,11 @@ class RedPixmap; class GDICanvas: public Canvas { public: - GDICanvas(PixmapCache& pixmap_cache, PaletteCache& palette_cache, + GDICanvas(int width, int height, uint32_t format, + PixmapCache& pixmap_cache, PaletteCache& palette_cache, GlzDecoderWindow &glz_decoder_window, CSurfaces &csurfaces); virtual ~GDICanvas(); - virtual void set_mode(int x, int y, int bits); virtual void thread_touch() {} virtual void copy_pixels(const QRegion& region, RedDrawable* dc, const PixmapHeader* pixmap); @@ -39,11 +39,6 @@ public: virtual CanvasType get_pixmap_type(); -private: - void create_pixmap(int width, int height); - void destroy_pixmap(); - void destroy(); - private: RedPixmapGdi *_pixmap; RedPixmapGdi *_helper_pixmap; -- cgit