summaryrefslogtreecommitdiffstats
path: root/client/red_cairo_canvas.cpp
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-02-08 15:38:24 +0100
committerAlexander Larsson <alexl@redhat.com>2010-02-23 14:43:20 +0100
commit0b0342ee7ece8ea5a811cfb05c70f03ca4e3bde3 (patch)
tree7e4ce72080519d7d55df6f3dadc63b6784c0856b /client/red_cairo_canvas.cpp
parent7537acd630e8973c92bb769b56d78836372b30c2 (diff)
downloadspice-0b0342ee7ece8ea5a811cfb05c70f03ca4e3bde3.tar.gz
spice-0b0342ee7ece8ea5a811cfb05c70f03ca4e3bde3.tar.xz
spice-0b0342ee7ece8ea5a811cfb05c70f03ca4e3bde3.zip
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.
Diffstat (limited to 'client/red_cairo_canvas.cpp')
-rw-r--r--client/red_cairo_canvas.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/client/red_cairo_canvas.cpp b/client/red_cairo_canvas.cpp
index 08880ea9..80a89b75 100644
--- a/client/red_cairo_canvas.cpp
+++ b/client/red_cairo_canvas.cpp
@@ -99,9 +99,8 @@ void CCanvas::set_mode(int width, int height, int depth, RedWindow *win)
THROW("create cairo failed, %s", cairo_status_to_string(cairo_status(cairo)));
}
if (!(_canvas = canvas_create(cairo, depth,
- &pixmap_cache(), bits_cache_put, bits_cache_get,
- &palette_cache(), palette_cache_put, palette_cache_get,
- palette_cache_release,
+ &pixmap_cache().base,
+ &palette_cache().base,
&glz_decoder(),
glz_decode))) {
THROW("create canvas failed");