diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-02-08 15:38:24 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-02-23 14:43:20 +0100 |
commit | 0b0342ee7ece8ea5a811cfb05c70f03ca4e3bde3 (patch) | |
tree | 7e4ce72080519d7d55df6f3dadc63b6784c0856b /common/gl_canvas.h | |
parent | 7537acd630e8973c92bb769b56d78836372b30c2 (diff) | |
download | spice-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 'common/gl_canvas.h')
-rw-r--r-- | common/gl_canvas.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/common/gl_canvas.h b/common/gl_canvas.h index 74c89137..794b1ea0 100644 --- a/common/gl_canvas.h +++ b/common/gl_canvas.h @@ -56,18 +56,11 @@ void *gl_canvas_get_usr_data(GLCanvas *canvas); #ifdef CAIRO_CANVAS_CACHE GLCanvas *gl_canvas_create(void *usr_data, int width, int height, int depth, - void *bits_cache_opaque, - bits_cache_put_fn_t bits_cache_put, - bits_cache_get_fn_t bits_cache_get, - void *palette_cache_opaque, - palette_cache_put_fn_t palette_cache_put, - palette_cache_get_fn_t palette_cache_get, - palette_cache_release_fn_t palette_cache_release + SpiceImageCache *bits_cache, + SpicePaletteCache *palette_cache #elif defined(CAIRO_CANVAS_IMAGE_CACHE) GLCanvas *gl_canvas_create(void *usr_data, int width, int height, int depth, - void *bits_cache_opaque, - bits_cache_put_fn_t bits_cache_put, - bits_cache_get_fn_t bits_cache_get + SpiceImageCache *bits_cache #else GLCanvas *gl_canvas_create(void *usr_data, int width, int height, int depth #endif |