summaryrefslogtreecommitdiff
path: root/backend/dvi/mdvi-lib
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/mdvi-lib
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/mdvi-lib')
-rw-r--r--backend/dvi/mdvi-lib/bitmap.c2
-rw-r--r--backend/dvi/mdvi-lib/mdvi.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/backend/dvi/mdvi-lib/bitmap.c b/backend/dvi/mdvi-lib/bitmap.c
index 53f21207..6edec1df 100644
--- a/backend/dvi/mdvi-lib/bitmap.c
+++ b/backend/dvi/mdvi-lib/bitmap.c
@@ -1028,6 +1028,8 @@ void mdvi_shrink_glyph_grey(DviContext *dvi, DviFont *font,
for(x = 0; x < w; x++)
dev->put_pixel(image, x, y, pixels[0]);
}
+
+ dev->image_done(image);
DEBUG((DBG_BITMAPS, "shrink_glyph_grey: (%dw,%dh,%dx,%dy) -> (%dw,%dh,%dx,%dy)\n",
glyph->w, glyph->h, glyph->x, glyph->y,
dest->w, dest->h, dest->x, dest->y));
diff --git a/backend/dvi/mdvi-lib/mdvi.h b/backend/dvi/mdvi-lib/mdvi.h
index 327e61fe..37664a76 100644
--- a/backend/dvi/mdvi-lib/mdvi.h
+++ b/backend/dvi/mdvi-lib/mdvi.h
@@ -99,6 +99,7 @@ typedef void *(*DviCreateImage) __PROTO((void *device_data,
Uint bpp));
typedef void (*DviFreeImage) __PROTO((void *image));
typedef void (*DviPutPixel) __PROTO((void *image, int x, int y, Ulong color));
+typedef void (*DviImageDone) __PROTO((void *image));
typedef void (*DviDevDestroy) __PROTO((void *data));
typedef void (*DviRefresh) __PROTO((DviContext *dvi, void *device_data));
typedef void (*DviSetColor) __PROTO((void *device_data, Ulong, Ulong));
@@ -114,6 +115,7 @@ struct _DviDevice {
DviCreateImage create_image;
DviFreeImage free_image;
DviPutPixel put_pixel;
+ DviImageDone image_done;
DviDevDestroy dev_destroy;
DviRefresh refresh;
DviSetColor set_color;