summaryrefslogtreecommitdiff
path: root/perf/cairo-perf-trace.c
diff options
context:
space:
mode:
authorBryce Harrington <b.harrington@samsung.com>2014-04-16 17:37:18 -0700
committerBryce Harrington <b.harrington@samsung.com>2014-04-18 10:09:10 -0700
commitcd11a4ff0421fd293279b202be800550890574bb (patch)
treead7ecaf85527daa7e47d98a4ed2bb167bfa69e6a /perf/cairo-perf-trace.c
parent3e22a8580a8045e450a2f2e47c8ac36abf8882ae (diff)
downloadcairo-cd11a4ff0421fd293279b202be800550890574bb.tar.gz
perf: Refactor some common macros to cairo-perf.h
These macros are standard in src's cairoint.h and test's cairo-test.h internal header files, so for consistency do the same thing with perf's cairo-perf.h. Reviewed-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'perf/cairo-perf-trace.c')
-rw-r--r--perf/cairo-perf-trace.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c
index f27f8e44d..02e0e29f9 100644
--- a/perf/cairo-perf-trace.c
+++ b/perf/cairo-perf-trace.c
@@ -199,7 +199,6 @@ scache_equal (const void *A,
return a->entry.hash == b->entry.hash;
}
-#define ARRAY_SIZE(A) (sizeof(A)/sizeof(A[0]))
static void
scache_mark_active (cairo_surface_t *surface)
{
@@ -210,7 +209,7 @@ scache_mark_active (cairo_surface_t *surface)
return;
t0 = cairo_surface_reference (surface);
- for (n = 0; n < ARRAY_SIZE (surface_holdovers); n++) {
+ for (n = 0; n < ARRAY_LENGTH (surface_holdovers); n++) {
if (surface_holdovers[n] == surface) {
surface_holdovers[n] = t0;
t0 = surface;
@@ -232,7 +231,7 @@ scache_clear (void)
if (surface_cache == NULL)
return;
- for (n = 0; n < ARRAY_SIZE (surface_holdovers); n++) {
+ for (n = 0; n < ARRAY_LENGTH (surface_holdovers); n++) {
cairo_surface_destroy (surface_holdovers[n]);
surface_holdovers[n] = NULL;
}