summaryrefslogtreecommitdiff
path: root/common/canvas_utils.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-02-09 16:39:35 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:25:37 +0100
commitf4b7a9d00451455505f4fb8dc3516eb893ae41b0 (patch)
tree34a980d82153f5632cdc307d22727b5d8a92ad0e /common/canvas_utils.h
parentf9e187c619dea25079c6b4499aedf1ce65d4511a (diff)
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 10f2d64..4fdbe6a 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