Re: GDK-DirectFB Patches
- From: Denis Oliver Kropp <dok directfb org>
- To: Carl Worth <cworth cworth org>
- Cc: gtk-devel-list gnome org, Claudio Ciccani <klan users sf net>, directfb-dev directfb org
- Subject: Re: GDK-DirectFB Patches
- Date: Thu, 06 Dec 2007 09:44:55 +0100
Carl Worth wrote:
> On Wed, 5 Dec 2007 12:15:38 -0800, "Mike Emmel" wrote:
>> I've not come up with a general
>> way to interleave a Cairo context
>> with directfb calls. So depending on how you do things you can get
>> unexpected results.
>
> Above we were talking about performance, right? And here you are
> talking about incorrect results, right? What's the cause of this? Is
> it that cairo-directfb is just broken?
>
> For interleaving cairo and non-cairo rendering, cairo provides the
> cairo_surface_flush and cairo_surface_mark_dirty APIs. Does
> cairo-directfb implement those and does your application use them.
Thanks for the pointer. The cairo-directfb backend seems to do nothing
in these functions. I'm not sure what it's supposed to do. Should the
first accumulate a region to flip and the second actually flips?
static cairo_status_t
_cairo_directfb_surface_mark_dirty_rectangle (void *abstract_surface,
int x,
int y,
int width,
int height)
{
#if 0
cairo_directfb_surface_t *surface = abstract_surface;
D_DEBUG_AT (Cairo_DirectFB,
"%s( surface=%p, x=%d, y=%d, width=%d, height=%d ).\n",
__FUNCTION__, surface, x, y, width, height);
if( !surface->dirty_region )
surface->dirty_region = malloc(sizeof(DFBRegion));
if (!dirty_region)
return CAIRO_STATUS_NO_MEMORY;
#endif
return CAIRO_STATUS_SUCCESS;
}
static cairo_status_t
_cairo_directfb_surface_flush (void *abstract_surface)
{
#if 0
cairo_directfb_surface_t *surface = abstract_surface;
D_DEBUG_AT (Cairo_DirectFB,
"%s( surface=%p ).\n", __FUNCTION__, surface);
if (surface->surface != surface->buffer) {
surface->surface->SetClip (surface->surface, NULL);
surface->surface->SetBlittingFlags (surface->surface, DSBLIT_NOFX);
surface->surface->Blit (surface->surface, surface->buffer, NULL, 0, 0);
}
#endif
return CAIRO_STATUS_SUCCESS;
}
No more ->surface and ->buffer exist, just ->dfbsurface.
typedef struct _cairo_directfb_surface {
cairo_surface_t base;
cairo_format_t format;
IDirectFB *dfb;
int owner;
IDirectFBSurface *dfbsurface;
/* color buffer */
cairo_surface_t *color;
DFBRegion *clips;
int n_clips;
DFBRegion *dirty_region;
int width;
int height;
} cairo_directfb_surface_t;
BTW, with the recent state/clipping fixes to GDK-DirectFB, the rectangle
filling in cairo-directfb could be fixed, I did not check the BTS entries
to verify what was the problem with it.
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]