summaryrefslogtreecommitdiff
path: root/source/fitz/draw-device.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-01-20 15:27:34 +0100
committerTor Andersson <tor.andersson@artifex.com>2015-02-17 16:31:34 +0100
commitb9d11456411907e9add8d91b02d67842990c2952 (patch)
treeca29439a35e83948645481cf0d0dfca445bf8b03 /source/fitz/draw-device.c
parent4fe9caafead64704a16c7093b72115893be3087f (diff)
downloadmupdf-b9d11456411907e9add8d91b02d67842990c2952.tar.xz
Reference count fz_path and fz_text.
Disallow modification of shared fz_path and fz_text objects. They should follow a create once, consume often pattern, and as such should be immutable once created.
Diffstat (limited to 'source/fitz/draw-device.c')
-rw-r--r--source/fitz/draw-device.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c
index f927e1b5..a8d745af 100644
--- a/source/fitz/draw-device.c
+++ b/source/fitz/draw-device.c
@@ -619,7 +619,7 @@ fz_draw_fill_text(fz_device *devp, fz_text *text, const fz_matrix *ctm,
if (path)
{
fz_draw_fill_path(devp, path, 0, ctm, colorspace, color, alpha);
- fz_free_path(dev->ctx, path);
+ fz_drop_path(dev->ctx, path);
}
else
{
@@ -682,7 +682,7 @@ fz_draw_stroke_text(fz_device *devp, fz_text *text, fz_stroke_state *stroke,
if (path)
{
fz_draw_stroke_path(devp, path, stroke, ctm, colorspace, color, alpha);
- fz_free_path(dev->ctx, path);
+ fz_drop_path(dev->ctx, path);
}
else
{
@@ -805,7 +805,7 @@ fz_draw_clip_text(fz_device *devp, fz_text *text, const fz_matrix *ctm, int accu
{
state[1].mask = state[1].dest;
state[1].dest = old_dest;
- fz_free_path(dev->ctx, path);
+ fz_drop_path(dev->ctx, path);
}
fz_catch(ctx)
{
@@ -911,7 +911,7 @@ fz_draw_clip_stroke_text(fz_device *devp, fz_text *text, fz_stroke_state *stroke
{
state[0].mask = state[0].dest;
state[0].dest = old_dest;
- fz_free_path(dev->ctx, path);
+ fz_drop_path(dev->ctx, path);
}
fz_catch(ctx)
{