summaryrefslogtreecommitdiff
path: root/backend/dvi/cairo-device.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-09 14:51:37 +0100
committerinfirit <[email protected]>2014-12-09 23:02:28 +0100
commit6bfdf82a2a4397ad4e0f6cb3d534b58138793a3c (patch)
treefb27e201869b9b6e0e292a775b30494ffda07e0e /backend/dvi/cairo-device.c
parent14d93b09c70997cca0ca9ba50ea584baea6ef477 (diff)
downloadatril-6bfdf82a2a4397ad4e0f6cb3d534b58138793a3c.tar.bz2
atril-6bfdf82a2a4397ad4e0f6cb3d534b58138793a3c.tar.xz
dvi: Add image_done method to DviDevice to notify that the image is finished
This way we can mark the surface dirty when all pixels have been modified. Taken from evince commit: c565f15e696db4b4cf983cdddf1e1ab273d547dc From: Carlos Garcia Campos <[email protected]>
Diffstat (limited to 'backend/dvi/cairo-device.c')
-rw-r--r--backend/dvi/cairo-device.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/dvi/cairo-device.c b/backend/dvi/cairo-device.c
index 47425cad..51aea379 100644
--- a/backend/dvi/cairo-device.c
+++ b/backend/dvi/cairo-device.c
@@ -260,6 +260,12 @@ dvi_cairo_put_pixel (void *image, int x, int y, Ulong color)
}
static void
+dvi_cairo_image_done (void *ptr)
+{
+ cairo_surface_mark_dirty((cairo_surface_t *)ptr);
+}
+
+static void
dvi_cairo_set_color (void *device_data, Ulong fg, Ulong bg)
{
DviCairoDevice *cairo_device = (DviCairoDevice *) device_data;
@@ -280,6 +286,7 @@ mdvi_cairo_device_init (DviDevice *device)
device->create_image = dvi_cairo_create_image;
device->free_image = dvi_cairo_free_image;
device->put_pixel = dvi_cairo_put_pixel;
+ device->image_done = dvi_cairo_image_done;
device->set_color = dvi_cairo_set_color;
#ifdef HAVE_SPECTRE
device->draw_ps = dvi_cairo_draw_ps;