diff options
author | Robin Watts <robin.watts@artifex.com> | 2011-09-14 17:36:57 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2011-09-15 14:50:17 +0100 |
commit | b51ef0eea028c73b6379e832eaa34fff3fbbb927 (patch) | |
tree | 1ab685ccd356e7fdc832b2e3322c0486b2670cfb /draw/draw_mesh.c | |
parent | 89ae81f651bfa112b8e07317eb6983beaf7cb212 (diff) | |
download | mupdf-b51ef0eea028c73b6379e832eaa34fff3fbbb927.tar.xz |
Add context to mupdf.
Huge pervasive change to lots of files, adding a context for exception
handling and allocation.
In time we'll move more statics into there.
Also fix some for(i = 0; i < function(...); i++) calls.
Diffstat (limited to 'draw/draw_mesh.c')
-rw-r--r-- | draw/draw_mesh.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/draw/draw_mesh.c b/draw/draw_mesh.c index 4254cb64..6df30307 100644 --- a/draw/draw_mesh.c +++ b/draw/draw_mesh.c @@ -520,7 +520,7 @@ fz_paint_mesh(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) } void -fz_paint_shade(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) +fz_paint_shade(fz_context *ctx, fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) { unsigned char clut[256][FZ_MAX_COLORS]; fz_pixmap *temp, *conv; @@ -538,8 +538,8 @@ fz_paint_shade(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) clut[i][k] = color[k] * 255; clut[i][k] = shade->function[i][shade->colorspace->n] * 255; } - conv = fz_new_pixmap_with_rect(dest->colorspace, bbox); - temp = fz_new_pixmap_with_rect(fz_device_gray, bbox); + conv = fz_new_pixmap_with_rect(ctx, dest->colorspace, bbox); + temp = fz_new_pixmap_with_rect(ctx, fz_device_gray, bbox); fz_clear_pixmap(temp); } else @@ -568,7 +568,7 @@ fz_paint_shade(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) *d++ = a; } fz_paint_pixmap(dest, conv, 255); - fz_drop_pixmap(conv); - fz_drop_pixmap(temp); + fz_drop_pixmap(ctx, conv); + fz_drop_pixmap(ctx, temp); } } |