From 8b541992e2722ceeac33e9f122e8326c79454158 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 7 Oct 2016 16:48:56 +0100 Subject: Use more bitfields in HTML. Saves 12 bytes per fz_html, and we have a lot. --- include/mupdf/html.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/mupdf/html.h b/include/mupdf/html.h index c3dd7977..a400993f 100644 --- a/include/mupdf/html.h +++ b/include/mupdf/html.h @@ -183,7 +183,10 @@ enum struct fz_html_s { - int type; + unsigned int type : 2; + unsigned int is_first_flow : 1; /* for text-indent */ + unsigned int markup_dir : 2; + unsigned int list_item : 27; float x, y, w, h; /* content */ float padding[4]; float margin[4]; @@ -191,10 +194,7 @@ struct fz_html_s float em; fz_html *up, *down, *last, *next; fz_html_flow *flow_head, **flow_tail; - fz_bidi_direction markup_dir; fz_css_style style; - int list_item; - int is_first_flow; /* for text-indent */ fz_pool *pool; /* pool allocator for this html tree (only set for root block) */ }; -- cgit v1.2.3