summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-09-26 10:51:03 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-26 11:52:48 +0100
commit1a1b39a9c35f8857e8ad36dc02c02ea5eae26021 (patch)
treecef1ded6a0cd8a07971ebb0f404c172e8c16a46e /src
parentbbacfc4e836ab09896b0ca3da9d90b582e35748c (diff)
script: compile without
The surface observer gained a dependency on script, make it optional.
Diffstat (limited to 'src')
-rw-r--r--src/cairo-surface-observer.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/cairo-surface-observer.c b/src/cairo-surface-observer.c
index f2c416460..22909e133 100644
--- a/src/cairo-surface-observer.c
+++ b/src/cairo-surface-observer.c
@@ -45,10 +45,13 @@
#include "cairo-pattern-private.h"
#include "cairo-output-stream-private.h"
#include "cairo-recording-surface-private.h"
-#include "cairo-script-private.h"
#include "cairo-surface-subsurface-private.h"
#include "cairo-reference-count-private.h"
+#if CAIRO_HAS_SCRIPT_SURFACE
+#include "cairo-script-private.h"
+#endif
+
static const cairo_surface_backend_t _cairo_surface_observer_backend;
/* observation/stats */
@@ -1767,6 +1770,7 @@ replay_record (cairo_observation_t *log,
cairo_observation_record_t *r,
cairo_device_t *script)
{
+#if CAIRO_HAS_SCRIPT_SURFACE
cairo_surface_t *surface;
cairo_int_status_t status;
@@ -1784,6 +1788,9 @@ replay_record (cairo_observation_t *log,
assert (status == CAIRO_INT_STATUS_SUCCESS);
return TRUE;
+#else
+ return FALSE;
+#endif
}
static cairo_time_t
@@ -1807,8 +1814,12 @@ _cairo_observation_print (cairo_output_stream_t *stream,
cairo_device_t *script;
cairo_time_t total;
+#if CAIRO_HAS_SCRIPT_SURFAC
script = _cairo_script_context_create_internal (stream);
_cairo_script_context_attach_snapshots (script, FALSE);
+#else
+ script = NULL;
+#endif
total = _cairo_observation_total_elapsed (log);