Modify as follows
static void gdk_window_impl_directfb_end_paint (GdkPaintable *paintable)
{
gint i;
GdkDrawableImplDirectFB *impl;
impl = GDK_DRAWABLE_IMPL_DIRECTFB (paintable);
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, paintable );
g_return_if_fail (impl->paint_depth > 0);
g_assert( impl->buffered );
impl->paint_depth--;
#ifdef GDK_DIRECTFB_NO_EXPERIMENTS
if (impl->paint_depth == 0)
{
impl->buffered = FALSE;
/*if (impl->paint_region.numRects)
{
DFBRegion reg = { impl->paint_region.extents.x1,
impl->paint_region.extents.y1,
impl->paint_region.extents.x2-1,
impl->paint_region.extents.y2-1 };
D_DEBUG_AT( GDKDFB_Window, " -> flip %4d,%4d-%4dx%4d (%ld boxes)\n",
DFB_RECTANGLE_VALS_FROM_REGION( ® ), impl->paint_region.numRects );
impl->surface->Flip( impl->surface, ®, 0 );
temp_region_reset( &impl->paint_region );
}*/
if (impl->paint_region.numRects)
{
for (i = 0; i < impl->paint_region.numRects; i++)
{
DFBRegion reg = { impl->paint_region.rects[i].x1,
impl->paint_region.rects[i].y1,
impl->paint_region.rects[i].x2,
impl->paint_region.rects[i].y2 };
D_DEBUG_AT( GDKDFB_Window, " -> flip %4d,%4d-%4dx%4d (%ld boxes)\n",
DFB_RECTANGLE_VALS_FROM_REGION( ® ), impl->paint_region.numRects );
impl->surface->Flip( impl->surface, ®, 0 );
}
temp_region_reset( &impl->paint_region );
}
}
#else
if (impl->paint_depth == 0)
{
impl->buffered = FALSE;
temp_region_deinit( &impl->clip_region );
if (impl->paint_region.numRects)
{
GdkWindow *window = GDK_WINDOW( impl->wrapper );
if (GDK_IS_WINDOW(window))
{
GdkWindowObject *top = GDK_WINDOW_OBJECT( gdk_window_get_toplevel( window ) );
if (top)
{
DFBRegion reg;
GdkWindowImplDirectFB *wimpl = GDK_WINDOW_IMPL_DIRECTFB (top->impl);
reg.x1 = impl->abs_x - top->x + impl->paint_region.extents.x1;
reg.y1 = impl->abs_y - top->y + impl->paint_region.extents.y1;
reg.x2 = impl->abs_x - top->x + impl->paint_region.extents.x2 - 1;
reg.y2 = impl->abs_y - top->y + impl->paint_region.extents.y2 - 1;
D_DEBUG_AT( GDKDFB_Window, " -> queue flip %4d,%4d-%4dx%4d (%ld boxes)\n",
DFB_RECTANGLE_VALS_FROM_REGION( ® ), impl->paint_region.numRects );
dfb_updates_add( &wimpl->flips, ® );
}
}
temp_region_reset( &impl->paint_region );
}
}
#endif
else
D_DEBUG_AT( GDKDFB_Window, " -> depth is still %d\n", impl->paint_depth );
}
沒有留言:
張貼留言