summaryrefslogtreecommitdiff
path: root/source/fitz/trace-device.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-11-08 13:00:50 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-11-08 13:14:36 +0100
commitb58b05fe601458de72b35c336590c9def6602081 (patch)
treeaf2d692365b1a02710facb003d7e533fa649d349 /source/fitz/trace-device.c
parent8ecdb40888d79fd0c92a4ac32490ba1140a330cf (diff)
downloadmupdf-b58b05fe601458de72b35c336590c9def6602081.tar.xz
Fix 699352: Call begin_layer for all marked content in PDF.
Since we call end_layer without distinction, we should also call begin_layer the same way. Also change the XML to emit separate tags for beginning and ending a layer, since there is no guarantee the layer calls will be neatly nested with clipping pushes and pops; nor is there a guarantee that the PDF will even balance the BMC/BDC and EMC operators.
Diffstat (limited to 'source/fitz/trace-device.c')
-rw-r--r--source/fitz/trace-device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/fitz/trace-device.c b/source/fitz/trace-device.c
index 1d94412b..f3e7edee 100644
--- a/source/fitz/trace-device.c
+++ b/source/fitz/trace-device.c
@@ -351,14 +351,14 @@ static void
fz_trace_begin_layer(fz_context *ctx, fz_device *dev, const char *name)
{
fz_output *out = ((fz_trace_device*)dev)->out;
- fz_write_printf(ctx, out, "<layer name=\"%s\">\n", name);
+ fz_write_printf(ctx, out, "<layer name=\"%s\"/>\n", name);
}
static void
fz_trace_end_layer(fz_context *ctx, fz_device *dev)
{
fz_output *out = ((fz_trace_device*)dev)->out;
- fz_write_printf(ctx, out, "</layer>\n");
+ fz_write_printf(ctx, out, "<end_layer/>\n");
}
fz_device *fz_new_trace_device(fz_context *ctx, fz_output *out)