From 0b0342ee7ece8ea5a811cfb05c70f03ca4e3bde3 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 8 Feb 2010 15:38:24 +0100 Subject: Turn image and palette cache into c style dynamic interface Instead of passing a bunch of function pointer and an opaque pointer we make a real type and add a vtable pointer to it. This means we can simplify all the canvas constructors, etc. --- client/red_gdi_canvas.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'client/red_gdi_canvas.cpp') diff --git a/client/red_gdi_canvas.cpp b/client/red_gdi_canvas.cpp index 8e50a066..e30845e8 100644 --- a/client/red_gdi_canvas.cpp +++ b/client/red_gdi_canvas.cpp @@ -81,10 +81,8 @@ void GDICanvas::set_mode(int width, int height, int depth) create_pixmap(width, height); if (!(_canvas = gdi_canvas_create(_pixmap->get_dc(), &_pixmap->get_mutex(), - depth, &pixmap_cache(), bits_cache_put, - bits_cache_get, &palette_cache(), - palette_cache_put, palette_cache_get, - palette_cache_release, + depth, &pixmap_cache().base, + &palette_cache().base, &glz_decoder(), glz_decode))) { THROW("create canvas failed"); -- cgit