summaryrefslogtreecommitdiff
path: root/source/fitz/geometry.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-10-24 01:07:23 +0100
committerRobin Watts <robin.watts@artifex.com>2016-10-24 13:23:50 +0100
commit956b4f190c94b5ee1d1746bcd1d776cf392e00ac (patch)
tree169532b67a2cfce085d9143593de6ba72c07835c /source/fitz/geometry.c
parent01f6954b88753d91e8dea7e369b3cc1eef75d423 (diff)
downloadmupdf-956b4f190c94b5ee1d1746bcd1d776cf392e00ac.tar.xz
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.
Diffstat (limited to 'source/fitz/geometry.c')
-rw-r--r--source/fitz/geometry.c8
1 files 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));
}