summaryrefslogtreecommitdiff
path: root/client/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/canvas.cpp
parent7537acd630e8973c92bb769b56d78836372b30c2 (diff)
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/canvas.cpp')
-rw-r--r--client/canvas.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/client/canvas.cpp b/client/canvas.cpp
index 04b0ce6..24ebd01 100644
--- a/client/canvas.cpp
+++ b/client/canvas.cpp
@@ -213,36 +213,6 @@ void Canvas::draw_stroke(SpiceMsgDisplayDrawStroke& stroke, int size)
draw_stroke(&stroke.base.box, &stroke.base.clip, &stroke.data);
}
-void Canvas::bits_cache_put(void *opaque, uint64_t id, cairo_surface_t *surface)
-{
- PixmapCache* cache = static_cast<PixmapCache*>(opaque);
- cache->add(id, surface);
-}
-
-cairo_surface_t* Canvas::bits_cache_get(void *opaque, uint64_t id)
-{
- PixmapCache* cache = static_cast<PixmapCache*>(opaque);
- return cache->get(id);
-}
-
-void Canvas::palette_cache_put(void *opaque, SpicePalette *palette)
-{
- PaletteCache* cache = static_cast<PaletteCache*>(opaque);
- AutoRef<CachedPalette> cached_palette(new CachedPalette(palette));
- cache->add(palette->unique, *cached_palette);
-}
-
-SpicePalette* Canvas::palette_cache_get(void *opaque, uint64_t id)
-{
- PaletteCache* cache = static_cast<PaletteCache*>(opaque);
- return cache->get(id)->palette();
-}
-
-void Canvas::palette_cache_release(SpicePalette* palette)
-{
- CachedPalette::unref(palette);
-}
-
void Canvas::glz_decode(void *opaque, uint8_t *data, SpicePalette *plt, void *usr_data)
{
GlzDecoder* decoder = static_cast<GlzDecoder*>(opaque);