summaryrefslogtreecommitdiff
path: root/boilerplate/cairo-boilerplate-directfb.c
diff options
context:
space:
mode:
authorVladimir Vukicevic <vladimir@pobox.com>2008-08-10 05:05:27 -0700
committerVladimir Vukicevic <vladimir@sleet.vlad1.com>2008-08-09 22:10:06 -0700
commit7fbda72137d8685718a8e8fe1d3af5b1d377521c (patch)
treede432bef0ce7b3e44dcede6f39ca22960d3542bd /boilerplate/cairo-boilerplate-directfb.c
parenta097bafd287ae3ee5ed3677a83b31d8d9d225a0c (diff)
downloadcairo-7fbda72137d8685718a8e8fe1d3af5b1d377521c.tar.gz
[dfb] optimize DirectFB blits
Diffstat (limited to 'boilerplate/cairo-boilerplate-directfb.c')
-rw-r--r--boilerplate/cairo-boilerplate-directfb.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/boilerplate/cairo-boilerplate-directfb.c b/boilerplate/cairo-boilerplate-directfb.c
index 894672d04..d6d616b19 100644
--- a/boilerplate/cairo-boilerplate-directfb.c
+++ b/boilerplate/cairo-boilerplate-directfb.c
@@ -17,6 +17,11 @@ make check
#include <stdio.h>
#include <stdlib.h>
+#include <direct/debug.h>
+
+D_DEBUG_DOMAIN( CairoDFB_Boiler, "CairoDFB/Boiler", "Cairo DirectFB Boilerplate" );
+
+
/* macro for a safe call to DirectFB functions */
#define DFBCHECK(x...) \
{ \
@@ -67,6 +72,13 @@ _cairo_boilerplate_directfb_window_create_surface (DFBInfo *info,
{
DFBWindowDescription desc;
int err;
+
+ D_DEBUG_AT( CairoDFB_Boiler, "%s( %p, %s, %dx%d )\n", __FUNCTION__, info,
+ content == CAIRO_CONTENT_ALPHA ? "ALPHA" :
+ content == CAIRO_CONTENT_COLOR ? "RGB" :
+ content == CAIRO_CONTENT_COLOR_ALPHA ? "ARGB" : "unknown content!",
+ width, height );
+
desc.flags = ( DWDESC_POSX | DWDESC_POSY |
DWDESC_WIDTH | DWDESC_HEIGHT /*| DWDESC_CAPS|DSDESC_PIXELFORMAT*/ );
desc.posx = 0;
@@ -97,7 +109,13 @@ _cairo_boilerplate_directfb_bitmap_create_surface (DFBInfo *info,
int err;
DFBSurfaceDescription desc;
- desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
+ D_DEBUG_AT( CairoDFB_Boiler, "%s( %p, %s, %dx%d )\n", __FUNCTION__, info,
+ content == CAIRO_CONTENT_ALPHA ? "ALPHA" :
+ content == CAIRO_CONTENT_COLOR ? "RGB" :
+ content == CAIRO_CONTENT_COLOR_ALPHA ? "ARGB" : "unknown content!",
+ width, height );
+
+ desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
desc.caps = DSCAPS_NONE;
desc.width = width;
desc.height = height;
@@ -135,6 +153,14 @@ _cairo_boilerplate_directfb_create_surface (const char *name,
return NULL;
}
+ D_DEBUG_AT( CairoDFB_Boiler, "%s( '%s', %s, %dx%d, %s )\n", __FUNCTION__, name,
+ content == CAIRO_CONTENT_ALPHA ? "ALPHA" :
+ content == CAIRO_CONTENT_COLOR ? "RGB" :
+ content == CAIRO_CONTENT_COLOR_ALPHA ? "ARGB" : "unknown content!",
+ width, height,
+ mode == CAIRO_BOILERPLATE_MODE_TEST ? "TEST" :
+ mode == CAIRO_BOILERPLATE_MODE_PERF ? "PERF" : "unknown mode!" );
+
if (width == 0)
width = 1;
if (height == 0)