#include <pixman.h>
#if HAS_DEBUG_FULL
-#define DBG(x) ErrorF x
+void LogF(const char *f, ...);
+#define DBG(x) LogF x
+#define ERR(x) ErrorF x
#else
#define DBG(x)
+#define ERR(x)
#endif
#include "sfb.h"
if (kgem_cleanup_cache(kgem))
goto retry_gtt;
- ErrorF("%s: failed to retrieve GTT offset for handle=%d: %d\n",
- __FUNCTION__, bo->handle, err);
+ ERR(("%s: failed to retrieve GTT offset for handle=%d: %d\n",
+ __FUNCTION__, bo->handle, err));
return NULL;
}
if (kgem_cleanup_cache(kgem))
goto retry_mmap;
- ErrorF("%s: failed to mmap handle=%d, %d bytes, into GTT domain: %d\n",
- __FUNCTION__, bo->handle, bytes(bo), err);
+ ERR(("%s: failed to mmap handle=%d, %d bytes, into GTT domain: %d\n",
+ __FUNCTION__, bo->handle, bytes(bo), err));
ptr = NULL;
}
if (kgem_cleanup_cache(kgem))
goto retry;
- ErrorF("%s: failed to write %d bytes into BO handle=%d: %d\n",
- __FUNCTION__, length, bo->handle, err);
+ ERR(("%s: failed to write %d bytes into BO handle=%d: %d\n",
+ __FUNCTION__, length, bo->handle, err));
return false;
}
int count = 0;
list_for_each_entry(bo, &kgem->flushing, request)
count++;
- ErrorF("%s: %d bo on flushing list\n", __FUNCTION__, count);
+ DBG(("%s: %d bo on flushing list\n", __FUNCTION__, count));
}
#endif
struct kgem_request,
list)->bo;
- ErrorF("%s: ring=%d, %d outstanding requests, oldest=%d\n",
- __FUNCTION__, ring, count, bo ? bo->handle : 0);
+ DBG(("%s: ring=%d, %d outstanding requests, oldest=%d\n",
+ __FUNCTION__, ring, count, bo ? bo->handle : 0));
}
#endif
if (kgem_cleanup_cache(kgem))
goto retry;
- ErrorF("%s: failed to write batch (handle=%d): %d\n",
- __FUNCTION__, handle, ret);
+ ERR(("%s: failed to write batch (handle=%d): %d\n",
+ __FUNCTION__, handle, ret));
return ret;
}
int snoop_count = 0;
list_for_each_entry(bo, &kgem->snoop, list)
snoop_count++, snoop_size += bytes(bo);
- ErrorF("%s: still allocated %d bo, %ld bytes, in snoop cache\n",
- __FUNCTION__, snoop_count, snoop_size);
+ DBG(("%s: still allocated %d bo, %ld bytes, in snoop cache\n",
+ __FUNCTION__, snoop_count, snoop_size));
}
#endif
for (i = 0; i < ARRAY_SIZE(kgem->inactive); i++)
list_for_each_entry(bo, &kgem->inactive[i], list)
inactive_count++, inactive_size += bytes(bo);
- ErrorF("%s: still allocated %d bo, %ld bytes, in inactive cache\n",
- __FUNCTION__, inactive_count, inactive_size);
+ DBG(("%s: still allocated %d bo, %ld bytes, in inactive cache\n",
+ __FUNCTION__, inactive_count, inactive_size));
}
#endif
if (kgem_cleanup_cache(kgem))
goto retry;
- ErrorF("%s: failed to mmap handle=%d, %d bytes, into CPU domain: %d\n",
- __FUNCTION__, bo->handle, bytes(bo), err);
+ ERR(("%s: failed to mmap handle=%d, %d bytes, into CPU domain: %d\n",
+ __FUNCTION__, bo->handle, bytes(bo), err));
return NULL;
}
#include "compiler.h"
#if HAS_DEBUG_FULL
-#define DBG(x) ErrorF x
+void LogF(const char *f, ...);
+#define DBG(x) LogF x
+#define ERR(x) ErrorF x
#else
#define DBG(x)
+#define ERR(x)
#endif
struct kgem_bo {
#include "compiler.h"
#if HAS_DEBUG_FULL
-#define DBG(x) ErrorF x
+void LogF(const char *f, ...);
+#define DBG(x) LogF x
+#define ERR(x) ErrorF x
#else
#define DBG(x)
+#define ERR(x)
#endif
#define DEBUG_NO_BLT 0
if (memcmp(src, dst, tmp->drawable.width * tmp->drawable.bitsPerPixel >> 3)) {
for (j = 0; src[j] == dst[j]; j++)
;
- ErrorF("mismatch at (%d, %d)\n",
- 8*j / tmp->drawable.bitsPerPixel, i);
+ ERR(("mismatch at (%d, %d)\n",
+ 8*j / tmp->drawable.bitsPerPixel, i));
abort();
}
src += pixmap->devKind;
box->x2 > pixmap->drawable.width ||
box->y2 > pixmap->drawable.height)
{
- ErrorF("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
- __FUNCTION__,
- box->x1, box->y1, box->x2, box->y2,
- pixmap->drawable.width,
- pixmap->drawable.height);
- assert(0);
+ FatalError("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
+ function,
+ box->x1, box->y1, box->x2, box->y2,
+ pixmap->drawable.width,
+ pixmap->drawable.height);
}
}
box->x2 > drawable->x + drawable->width ||
box->y2 > drawable->y + drawable->height)
{
- ErrorF("%s: damage box is beyond the drawable: box=(%d, %d), (%d, %d), drawable=(%d, %d)x(%d, %d)\n",
- __FUNCTION__,
- box->x1, box->y1, box->x2, box->y2,
- drawable->x, drawable->y,
- drawable->width, drawable->height);
- assert(0);
+ FatalError("%s: damage box is beyond the drawable: box=(%d, %d), (%d, %d), drawable=(%d, %d)x(%d, %d)\n",
+ function,
+ box->x1, box->y1, box->x2, box->y2,
+ drawable->x, drawable->y,
+ drawable->width, drawable->height);
}
}
}
static PixmapPtr
+create_pixmap_hdr(struct sna *sna, int usage)
+{
+ PixmapPtr pixmap;
+
+ pixmap = sna->freed_pixmap;
+ sna->freed_pixmap = pixmap->devPrivate.ptr;
+ assert(pixmap->refcnt == 0);
+
+ pixmap->usage_hint = usage;
+ pixmap->refcnt = 1;
+ pixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+
+#if DEBUG_MEMORY
+ sna->debug_memory.pixmap_allocs++;
+#endif
+
+ return pixmap;
+}
+
+static PixmapPtr
sna_pixmap_create_shm(ScreenPtr screen,
int width, int height, int depth,
char *addr)
}
if (sna->freed_pixmap) {
- pixmap = sna->freed_pixmap;
- sna->freed_pixmap = pixmap->devPrivate.ptr;
- assert(pixmap->refcnt == 0);
-
- pixmap->usage_hint = 0;
- pixmap->refcnt = 1;
+ pixmap = create_pixmap_hdr(sna, 0);
pixmap->drawable.width = width;
pixmap->drawable.height = height;
pixmap->drawable.depth = depth;
pixmap->drawable.bitsPerPixel = bpp;
- pixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
DBG(("%s: serial=%ld, %dx%d\n",
__FUNCTION__,
/* you promise never to access this via the cpu... */
if (sna->freed_pixmap) {
- pixmap = sna->freed_pixmap;
- sna->freed_pixmap = pixmap->devPrivate.ptr;
- assert(pixmap->refcnt == 0);
-
- pixmap->usage_hint = CREATE_PIXMAP_USAGE_SCRATCH;
- pixmap->refcnt = 1;
+ pixmap = create_pixmap_hdr(sna, CREATE_PIXMAP_USAGE_SCRATCH);
pixmap->drawable.width = width;
pixmap->drawable.height = height;
pixmap->drawable.depth = depth;
pixmap->drawable.bitsPerPixel = bpp;
- pixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
DBG(("%s: serial=%ld, usage=%d, %dx%d\n",
__FUNCTION__,
CREATE_PIXMAP_USAGE_SCRATCH);
if (sna->freed_pixmap) {
- pixmap = sna->freed_pixmap;
- sna->freed_pixmap = pixmap->devPrivate.ptr;
- assert(pixmap->refcnt == 0);
-
- pixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
- pixmap->refcnt = 1;
+ pixmap = create_pixmap_hdr(sna, CREATE_PIXMAP_USAGE_SCRATCH);
} else {
pixmap = create_pixmap(sna, screen, 0, 0, depth,
CREATE_PIXMAP_USAGE_SCRATCH);
static void sna_accel_debug_memory(struct sna *sna)
{
- ErrorF("Allocated pixmaps: %d\n",
- sna->debug_memory.pixmap_allocs);
- ErrorF("Allocated bo: %d, %ld bytes\n",
- sna->kgem.debug_memory.bo_allocs,
- (long)sna->kgem.debug_memory.bo_bytes);
- ErrorF("Allocated CPU bo: %d, %ld bytes\n",
- sna->debug_memory.cpu_bo_allocs,
- (long)sna->debug_memory.cpu_bo_bytes);
+ DBG(("Allocated pixmaps: %d\n",
+ sna->debug_memory.pixmap_allocs));
+ DBG(("Allocated bo: %d, %ld bytes\n",
+ sna->kgem.debug_memory.bo_allocs,
+ (long)sna->kgem.debug_memory.bo_bytes));
+ DBG(("Allocated CPU bo: %d, %ld bytes\n",
+ sna->debug_memory.cpu_bo_allocs,
+ (long)sna->debug_memory.cpu_bo_bytes));
#ifdef VALGRIND_DO_ADDED_LEAK_CHECK
VG(VALGRIND_DO_ADDED_LEAK_CHECK);
sna->kgem.scanout_busy = false;
if (FAULT_INJECTION && (rand() % FAULT_INJECTION) == 0) {
- ErrorF("%s hardware acceleration\n",
- sna->kgem.wedged ? "Re-enabling" : "Disabling");
+ DBG(("%s hardware acceleration\n",
+ sna->kgem.wedged ? "Re-enabling" : "Disabling"));
kgem_submit(&sna->kgem);
sna->kgem.wedged = !sna->kgem.wedged;
}
box->x2 > pixmap->drawable.width ||
box->y2 > pixmap->drawable.height)
{
- ErrorF("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
- __FUNCTION__,
- box->x1, box->y1, box->x2, box->y2,
- pixmap->drawable.width,
- pixmap->drawable.height);
- assert(0);
+ FatalError("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
+ function,
+ box->x1, box->y1, box->x2, box->y2,
+ pixmap->drawable.width,
+ pixmap->drawable.height);
}
}
#define assert_pixmap_contains_box(p, b) _assert_pixmap_contains_box(p, b, __FUNCTION__)
damage = __sna_damage_add(damage, region);
- ErrorF(" = %s\n",
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
+ DBG((" = %s\n",
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage)));
assert(RegionNumRects(&damage->region));
assert(damage->region.extents.x2 > damage->region.extents.x1);
assert(damage->region.extents.y2 > damage->region.extents.y1);
damage = __sna_damage_add_boxes(damage, b, n, dx, dy);
- ErrorF(" = %s\n",
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
+ DBG((" = %s\n",
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage)));
if (RegionNumRects(&damage->region)) {
assert(damage->region.extents.x2 > damage->region.extents.x1);
assert(damage->region.extents.y2 > damage->region.extents.y1);
damage = __sna_damage_add_rectangles(damage, r, n, dx, dy);
- ErrorF(" = %s\n",
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
+ DBG((" = %s\n",
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage)));
if (RegionNumRects(&damage->region)) {
assert(damage->region.extents.x2 > damage->region.extents.x1);
assert(damage->region.extents.y2 > damage->region.extents.y1);
damage = __sna_damage_add_points(damage, p, n, dx, dy);
- ErrorF(" = %s\n",
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
+ DBG((" = %s\n",
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage)));
if (RegionNumRects(&damage->region)) {
assert(damage->region.extents.x2 > damage->region.extents.x1);
assert(damage->region.extents.y2 > damage->region.extents.y1);
damage = __sna_damage_add_box(damage, box);
- ErrorF(" = %s\n",
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
+ DBG((" = %s\n",
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage)));
assert(RegionNumRects(&damage->region));
assert(damage->region.extents.x2 > damage->region.extents.x1);
assert(damage->region.extents.y2 > damage->region.extents.y1);
char damage_buf[1000];
char region_buf[120];
- ErrorF("%s(%s - %s)...\n", __FUNCTION__,
+ DBG(("%s(%s - %s)...\n", __FUNCTION__,
_debug_describe_damage(damage_buf, sizeof(damage_buf), damage),
- _debug_describe_region(region_buf, sizeof(region_buf), region));
+ _debug_describe_region(region_buf, sizeof(region_buf), region)));
damage = __sna_damage_subtract(damage, region);
- ErrorF(" = %s\n",
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
+ DBG((" = %s\n",
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage)));
return damage;
}
{
char damage_buf[1000];
- ErrorF("%s(%s - (%d, %d), (%d, %d))...\n", __FUNCTION__,
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage),
- box->x1, box->y1, box->x2, box->y2);
+ DBG(("%s(%s - (%d, %d), (%d, %d))...\n", __FUNCTION__,
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage),
+ box->x1, box->y1, box->x2, box->y2));
damage = __sna_damage_subtract_box(damage, box);
- ErrorF(" = %s\n",
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
+ DBG((" = %s\n",
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage)));
return damage;
}
{
char damage_buf[1000];
- ErrorF("%s(%s - [(%d,%d), (%d,%d)...x%d])...\n", __FUNCTION__,
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage),
- box->x1 + dx, box->y1 + dy,
- box->x2 + dx, box->y2 + dy,
- n);
+ DBG(("%s(%s - [(%d,%d), (%d,%d)...x%d])...\n", __FUNCTION__,
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage),
+ box->x1 + dx, box->y1 + dy,
+ box->x2 + dx, box->y2 + dy,
+ n));
damage = __sna_damage_subtract_boxes(damage, box, n, dx, dy);
- ErrorF(" = %s\n",
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
+ DBG((" = %s\n",
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage)));
return damage;
}
box->x1, box->y1, box->x2, box->y2));
ret = __sna_damage_contains_box(damage, box);
- ErrorF(" = %d", ret);
+ DBG((" = %d", ret));
if (ret)
- ErrorF(" [(%d, %d), (%d, %d)...]",
- box->x1, box->y1, box->x2, box->y2);
- ErrorF("\n");
+ DBG((" [(%d, %d), (%d, %d)...]",
+ box->x1, box->y1, box->x2, box->y2));
+ DBG(("\n"));
return ret;
}
char region_buf[120];
bool ret;
- ErrorF("%s(%s, %s)...\n", __FUNCTION__,
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage),
- _debug_describe_region(region_buf, sizeof(region_buf), region));
+ DBG(("%s(%s, %s)...\n", __FUNCTION__,
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage),
+ _debug_describe_region(region_buf, sizeof(region_buf), region)));
ret = __sna_damage_intersect(damage, region, result);
if (ret)
- ErrorF(" = %s\n",
- _debug_describe_region(region_buf, sizeof(region_buf), result));
+ DBG((" = %s\n",
+ _debug_describe_region(region_buf, sizeof(region_buf), result)));
else
- ErrorF(" = none\n");
+ DBG((" = none\n"));
return ret;
}
char damage_buf[1000];
int count;
- ErrorF("%s(%s)...\n", __FUNCTION__,
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
+ DBG(("%s(%s)...\n", __FUNCTION__,
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage)));
count = __sna_damage_get_boxes(damage, boxes);
- ErrorF(" = %d\n", count);
+ DBG((" = %d\n", count));
return count;
}
r_boxes = pixman_region_rectangles(region, &r_num);
if (d_num != r_num) {
- ErrorF("%s: damage and ref contain different number of rectangles\n",
- __FUNCTION__);
+ ERR(("%s: damage and ref contain different number of rectangles\n",
+ __FUNCTION__));
return false;
}
if (memcmp(d_boxes, r_boxes, d_num*sizeof(BoxRec))) {
- ErrorF("%s: damage and ref contain different rectangles\n",
- __FUNCTION__);
+ ERR(("%s: damage and ref contain different rectangles\n",
+ __FUNCTION__));
return false;
}
int iter, i;
iter = 1 + rand() % (1 + (pass / 64));
- ErrorF("%s: pass %d, iters=%d\n", __FUNCTION__, pass, iter);
+ DBG(("%s: pass %d, iters=%d\n", __FUNCTION__, pass, iter));
test.width = 1 + rand() % 2048;
test.height = 1 + rand() % 2048;
}
if (!check[rand() % ARRAY_SIZE(check)](&test, &damage, &ref)) {
- ErrorF("%s: failed - region = %s, damage = %s\n", __FUNCTION__,
- _debug_describe_region(region_buf, sizeof(region_buf), &ref),
- _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
- assert(0);
+ FatalError("%s: failed - region = %s, damage = %s\n", __FUNCTION__,
+ _debug_describe_region(region_buf, sizeof(region_buf), &ref),
+ _debug_describe_damage(damage_buf, sizeof(damage_buf), damage));
}
pixman_region_fini(&ref);
break;
default:
- ErrorF("sna_pm_event: received APM event %d\n", event);
+ ERR(("sna_pm_event: received APM event %d\n", event));
}
return TRUE;
}
return TRUE;
}
+
+#if HAS_DEBUG_FULL
+_X_ATTRIBUTE_PRINTF(1, 0) void LogF(const char *f, ...)
+{
+ va_list ap;
+
+ va_start(ap, f);
+ LogVWrite(1, f, ap);
+ va_end(ap);
+}
+#endif
box->x2 > pixmap->drawable.width ||
box->y2 > pixmap->drawable.height)
{
- ErrorF("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
- __FUNCTION__,
- box->x1, box->y1, box->x2, box->y2,
- pixmap->drawable.width,
- pixmap->drawable.height);
- assert(0);
+ FatalError("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
+ function,
+ box->x1, box->y1, box->x2, box->y2,
+ pixmap->drawable.width,
+ pixmap->drawable.height);
}
}
#define assert_pixmap_contains_box(p, b) _assert_pixmap_contains_box(p, b, __FUNCTION__)
#include <mipict.h>
-#if 0
-#define __DBG(x) ErrorF x
-#else
-#define __DBG(x)
-#endif
-
/* TODO: Emit unantialiased and MSAA triangles. */
#ifndef MAX
#include <mipict.h>
-#if 0
-#define __DBG(x) ErrorF x
-#else
-#define __DBG(x)
-#endif
-
/* TODO: Emit unantialiased and MSAA triangles. */
#ifndef MAX
box->x2 > pixmap->drawable.width ||
box->y2 > pixmap->drawable.height)
{
- ErrorF("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
- __FUNCTION__,
- box->x1, box->y1, box->x2, box->y2,
- pixmap->drawable.width,
- pixmap->drawable.height);
- assert(0);
+ FatalError("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
+ function,
+ box->x1, box->y1, box->x2, box->y2,
+ pixmap->drawable.width,
+ pixmap->drawable.height);
}
}
#define assert_pixmap_contains_box(p, b) _assert_pixmap_contains_box(p, b, __FUNCTION__)
#undef SAMPLES_Y
#if 0
-#define __DBG(x) ErrorF x
+#define __DBG(x) LogF x
#else
#define __DBG(x)
#endif
box->x2 > pixmap->drawable.width ||
box->y2 > pixmap->drawable.height)
{
- ErrorF("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
- __FUNCTION__,
- box->x1, box->y1, box->x2, box->y2,
- pixmap->drawable.width,
- pixmap->drawable.height);
- assert(0);
+ FatalError("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
+ function,
+ box->x1, box->y1, box->x2, box->y2,
+ pixmap->drawable.width,
+ pixmap->drawable.height);
}
}
#define assert_pixmap_contains_box(p, b) _assert_pixmap_contains_box(p, b, __FUNCTION__)
#include <mipict.h>
#if 0
-#define __DBG(x) ErrorF x
+#define __DBG(x) LogF x
#else
#define __DBG(x)
#endif
static inline void
__dbg_mono_edges(const char *function, struct mono_edge *edges)
{
- ErrorF("%s: ", function);
+ DBG(("%s: ", function));
while (edges) {
if (edges->x.quo < INT16_MAX << 16) {
- ErrorF("(%d.%06d)+(%d.%06d)x%d, ",
- edges->x.quo, edges->x.rem,
- edges->dxdy.quo, edges->dxdy.rem,
- edges->dy*edges->dir);
+ DBG(("(%d.%06d)+(%d.%06d)x%d, ",
+ edges->x.quo, edges->x.rem,
+ edges->dxdy.quo, edges->dxdy.rem,
+ edges->dy*edges->dir));
}
edges = edges->next;
}
- ErrorF("\n");
+ DBG(("\n"));
}
#define DBG_MONO_EDGES(x) __dbg_mono_edges(__FUNCTION__, x)
static inline void
#undef FAST_SAMPLES_Y
#if 0
-#define __DBG(x) ErrorF x
+#define __DBG(x) LogF x
#else
#define __DBG(x)
#endif
box->x2 > pixmap->drawable.width ||
box->y2 > pixmap->drawable.height)
{
- ErrorF("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
- __FUNCTION__,
- box->x1, box->y1, box->x2, box->y2,
- pixmap->drawable.width,
- pixmap->drawable.height);
- assert(0);
+ FatalError("%s: damage box is beyond the pixmap: box=(%d, %d), (%d, %d), pixmap=(%d, %d)\n",
+ function,
+ box->x1, box->y1, box->x2, box->y2,
+ pixmap->drawable.width,
+ pixmap->drawable.height);
}
}
#define assert_pixmap_contains_box(p, b) _assert_pixmap_contains_box(p, b, __FUNCTION__)