summaryrefslogtreecommitdiff
path: root/src/cairo-fixed.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2004-12-20 09:43:59 +0000
committerAlexander Larsson <alexl@redhat.com>2004-12-20 09:43:59 +0000
commit5c1c5e67dc18c3ad96a1d885b4c7331d48036158 (patch)
tree592c6ac3818b96d47dfec887f50d9e62720e5d51 /src/cairo-fixed.c
parent8fe87a32a8bf4754a24e27aad74c1f1f5dbe9fc7 (diff)
downloadcairo-5c1c5e67dc18c3ad96a1d885b4c7331d48036158.tar.gz
Add _cairo_gstate_restore_external_state, _cairo_fixed_integer_floor and _cairo_fixed_integer_ceil.
Call _cairo_gstate_restore_external_state on restore. Fix cache-misses. Implement floor and ceil Restore surface clip region on restroe. (_calculate_region_for_intermediate_clip_surface), (_cairo_gstate_clip_and_composite_trapezoids), (_cairo_gstate_show_surface), (_cairo_gstate_show_glyphs): Create intermediate clip surfaces of the minimal required size.
Diffstat (limited to 'src/cairo-fixed.c')
-rw-r--r--src/cairo-fixed.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/cairo-fixed.c b/src/cairo-fixed.c
index 32368d7fc..ee31718ef 100644
--- a/src/cairo-fixed.c
+++ b/src/cairo-fixed.c
@@ -71,3 +71,21 @@ _cairo_fixed_integer_part (cairo_fixed_t f)
{
return f >> 16;
}
+
+int
+_cairo_fixed_integer_floor (cairo_fixed_t f)
+{
+ if (f >= 0)
+ return f >> 16;
+ else
+ return -((-f - 1) >> 16) - 1;
+}
+
+int
+_cairo_fixed_integer_ceil (cairo_fixed_t f)
+{
+ if (f >= 0)
+ return ((f - 1)>>16) + 1;
+ else
+ return - (-f >> 16);
+}