summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/path.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-03-13 17:09:29 +0000
committerRobin Watts <robin.watts@artifex.com>2015-03-24 19:50:01 +0000
commit33c49228d078cc963ac5e59e526c97d2fd50a01f (patch)
tree233e29c78e497ca3b4d90bb3ea03ab846b61fbc6 /include/mupdf/fitz/path.h
parent5f161e45d5daacb696d02b8fad23d0c23f5bc8bc (diff)
downloadmupdf-33c49228d078cc963ac5e59e526c97d2fd50a01f.tar.xz
Path packing for memory efficiency.
Introduce the concept of 'packed' paths. These reduce the header overhead for most common paths (ones with less than 256 commands and 256 coords) to a single 32bit int once stored in the display list. The previous commit reduces the torture-test.pdf from 95 to 87Meg. This commit futher reduces it to 70Meg.
Diffstat (limited to 'include/mupdf/fitz/path.h')
-rw-r--r--include/mupdf/fitz/path.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mupdf/fitz/path.h b/include/mupdf/fitz/path.h
index 1bca1858..81b6f7bb 100644
--- a/include/mupdf/fitz/path.h
+++ b/include/mupdf/fitz/path.h
@@ -64,6 +64,8 @@ fz_path *fz_new_path(fz_context *ctx);
fz_path *fz_keep_path(fz_context *ctx, fz_path *path);
void fz_drop_path(fz_context *ctx, fz_path *path);
void fz_trim_path(fz_context *ctx, fz_path *path);
+int fz_packed_path_size(const fz_path *path);
+int fz_pack_path(fz_context *ctx, uint8_t *pack, int max, const fz_path *path);
fz_point fz_currentpoint(fz_context *ctx, fz_path *path);
void fz_moveto(fz_context*, fz_path*, float x, float y);