summaryrefslogtreecommitdiffstats
path: root/common/canvas_utils.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-02-09 16:39:35 +0100
committerAlexander Larsson <alexl@redhat.com>2010-02-23 22:52:01 +0100
commit16780a7b81376b7019b55cb25068177a0b664d90 (patch)
treecc8cf4d2ef2de854b6b01d95b793f29f57a08a82 /common/canvas_utils.h
parent0b0342ee7ece8ea5a811cfb05c70f03ca4e3bde3 (diff)
downloadspice-16780a7b81376b7019b55cb25068177a0b664d90.tar.gz
spice-16780a7b81376b7019b55cb25068177a0b664d90.tar.xz
spice-16780a7b81376b7019b55cb25068177a0b664d90.zip
Use pixman_image_t instead of cairo_surface_t as the generic pixman container
This allows us to use the simpler dependency of pixman outside of the cairo backend, and it later lets us move the cairo backend to using pixman only.
Diffstat (limited to 'common/canvas_utils.h')
-rw-r--r--common/canvas_utils.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/common/canvas_utils.h b/common/canvas_utils.h
index 10f2d640..4fdbe6a8 100644
--- a/common/canvas_utils.h
+++ b/common/canvas_utils.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
Copyright (C) 2009 Red Hat, Inc.
@@ -20,31 +21,30 @@
#include <spice/types.h>
-#include "cairo.h"
+#include "pixman_utils.h"
#include "lz.h"
+typedef struct PixmanData {
#ifdef WIN32
-typedef struct BitmapCache {
HBITMAP bitmap;
HANDLE mutex;
-} BitmapCache;
#endif
-
-extern const cairo_user_data_key_t bitmap_data_type;
+ uint8_t *data;
+} PixmanData;
#ifdef WIN32
-cairo_surface_t *surface_create(HDC dc, cairo_format_t format,
- int width, int height, int top_down);
+pixman_image_t *surface_create(HDC dc, pixman_format_code_t format,
+ int width, int height, int top_down);
#else
-cairo_surface_t *surface_create(cairo_format_t format, int width, int height, int top_down);
+pixman_image_t *surface_create(pixman_format_code_t format, int width, int height, int top_down);
#endif
#ifdef WIN32
-cairo_surface_t *surface_create_stride(HDC dc, cairo_format_t format, int width, int height,
- int stride);
+pixman_image_t *surface_create_stride(HDC dc, pixman_format_code_t format, int width, int height,
+ int stride);
#else
-cairo_surface_t *surface_create_stride(cairo_format_t format, int width, int height,
- int stride);
+pixman_image_t *surface_create_stride(pixman_format_code_t format, int width, int height,
+ int stride);
#endif
@@ -52,10 +52,10 @@ typedef struct LzDecodeUsrData {
#ifdef WIN32
HDC dc;
#endif
- cairo_surface_t *out_surface;
+ pixman_image_t *out_surface;
} LzDecodeUsrData;
-cairo_surface_t *alloc_lz_image_surface(LzDecodeUsrData *canvas_data, LzImageType type, int width,
- int height, int gross_pixels, int top_down);
+pixman_image_t *alloc_lz_image_surface(LzDecodeUsrData *canvas_data, LzImageType type, int width,
+ int height, int gross_pixels, int top_down);
#endif