diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-08-30 16:15:28 +0200 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-09-02 12:27:13 +0200 |
commit | 0101a545793291d0fe76b765ba8392ade5faa1a1 (patch) | |
tree | 7294a6416e8036672b41cae84c3f2ff6849154f3 /src/cairo-surface-observer-private.h | |
parent | e7204a3631d29d334511f291db8c31ce0026e2ce (diff) | |
download | cairo-0101a545793291d0fe76b765ba8392ade5faa1a1.tar.gz |
time: Add cairo_time_t type
Add the cairo_time_t type (currently based on cairo_uint64_t) and use
it in cairo-observer and in the perf suite.
Fixes the build on MacOS X (for the src/ subdir) and Win32, whch
failed because they don't provide clock_gettime:
cairo-surface-observer.c:629: error: implicit declaration of function 'clock_gettime'
cairo-surface-observer.c:629: warning: nested extern declaration of 'clock_gettime'
cairo-surface-observer.c:629: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
...
Diffstat (limited to 'src/cairo-surface-observer-private.h')
-rw-r--r-- | src/cairo-surface-observer-private.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/cairo-surface-observer-private.h b/src/cairo-surface-observer-private.h index a846a1c26..61507b21d 100644 --- a/src/cairo-surface-observer-private.h +++ b/src/cairo-surface-observer-private.h @@ -41,6 +41,7 @@ #include "cairo-device-private.h" #include "cairo-recording-surface-private.h" #include "cairo-surface-private.h" +#include "cairo-time-private.h" struct stat { double min, max, sum, sum_sq; @@ -89,7 +90,7 @@ struct _cairo_observation_record { double tolerance; int antialias; int clip; - double elapsed; + cairo_time_t elapsed; }; struct _cairo_observation { @@ -100,7 +101,7 @@ struct _cairo_observation { /* XXX put interesting stats here! */ struct paint { - double elapsed; + cairo_time_t elapsed; unsigned int count; struct extents extents; unsigned int operators[NUM_OPERATORS]; @@ -112,7 +113,7 @@ struct _cairo_observation { } paint; struct mask { - double elapsed; + cairo_time_t elapsed; unsigned int count; struct extents extents; unsigned int operators[NUM_OPERATORS]; @@ -125,7 +126,7 @@ struct _cairo_observation { } mask; struct fill { - double elapsed; + cairo_time_t elapsed; unsigned int count; struct extents extents; unsigned int operators[NUM_OPERATORS]; @@ -140,7 +141,7 @@ struct _cairo_observation { } fill; struct stroke { - double elapsed; + cairo_time_t elapsed; unsigned int count; struct extents extents; unsigned int operators[NUM_OPERATORS]; @@ -157,7 +158,7 @@ struct _cairo_observation { } stroke; struct glyphs { - double elapsed; + cairo_time_t elapsed; unsigned int count; struct extents extents; unsigned int operators[NUM_OPERATORS]; |