summaryrefslogtreecommitdiffstats
path: root/common/gdi_canvas.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-04-19 16:19:43 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:25:42 +0100
commit5fc47f848c115702cf4110041fc34800e563536d (patch)
tree69236761efe2c241a2c3d7de13565c8afef58c96 /common/gdi_canvas.c
parentfbcc890794405181b3cd1ba1c201b67443f40824 (diff)
downloadspice-common-5fc47f848c115702cf4110041fc34800e563536d.tar.gz
spice-common-5fc47f848c115702cf4110041fc34800e563536d.tar.xz
spice-common-5fc47f848c115702cf4110041fc34800e563536d.zip
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.
Diffstat (limited to 'common/gdi_canvas.c')
-rw-r--r--common/gdi_canvas.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c
index ead94af..c600419 100644
--- a/common/gdi_canvas.c
+++ b/common/gdi_canvas.c
@@ -1884,7 +1884,7 @@ static int need_init = 1;
static SpiceCanvasOps gdi_canvas_ops;
SpiceCanvas *gdi_canvas_create(int width, int height,
- HDC dc, RecurciveMutex* lock, int bits
+ HDC dc, RecurciveMutex* lock, uint32_t format
#ifdef CAIRO_CANVAS_CACHE
, SpiceImageCache *bits_cache
, SpicePaletteCache *palette_cache
@@ -1903,7 +1903,7 @@ SpiceCanvas *gdi_canvas_create(int width, int height,
}
canvas = spice_new0(GdiCanvas, 1);
init_ok = canvas_base_init(&canvas->base, &gdi_canvas_ops,
- width, height, bits
+ width, height, format
#ifdef CAIRO_CANVAS_CACHE
,bits_cache
,palette_cache