From 956b4f190c94b5ee1d1746bcd1d776cf392e00ac Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 24 Oct 2016 01:07:23 +0100 Subject: Bug 697234: Fix slow rendering. fz_contains_rect was improperly implemented (the logic in the final test was reversed). This was causing us to use the font bbox for some t3 glyphs, resulting in massive bboxes, that could never be cached. Rerendering these each time was taking ages, even though there was nothing actually in them. --- source/fitz/geometry.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/fitz/geometry.c b/source/fitz/geometry.c index 1d3d0f66..7a8d162b 100644 --- a/source/fitz/geometry.c +++ b/source/fitz/geometry.c @@ -547,8 +547,8 @@ int fz_contains_rect(const fz_rect *a, const fz_rect *b) return 1; if (fz_is_empty_rect(a)) return 0; - return ((a->x0 > b->x0) || - (a->y0 > b->y0) || - (a->x1 < b->x1) || - (a->y1 < b->y1)); + return ((a->x0 <= b->x0) && + (a->y0 <= b->y0) && + (a->x1 >= b->x1) && + (a->y1 >= b->y1)); } -- cgit v1.2.3