forked from AuroraMiddleware/gtk
Applied a patch by Claudio Ciccani which fixes the mixing of gdk and cairo
2007-12-11 Attilio Fiandrotti <attilio.fiandrotti@gmail.com> * gdk/directfb/gdkdrawable-directfb.c: Applied a patch by Claudio Ciccani which fixes the mixing of gdk and cairo rendering. svn path=/trunk/; revision=19161
This commit is contained in:
parent
13a8c0511a
commit
15d6ae4003
@ -1,3 +1,8 @@
|
||||
2007-12-11 Attilio Fiandrotti <attilio.fiandrotti@gmail.com>
|
||||
|
||||
* gdk/directfb/gdkdrawable-directfb.c: Applied a patch by Claudio
|
||||
Ciccani which fixes the mixing of gdk and cairo rendering.
|
||||
|
||||
2007-12-11 Mathias Hasselmann <mathias@openismus.com>
|
||||
|
||||
* gtk/gtkdnd.c, gtk/gtkwidget.c: Mention impact of GtkDestDefaults
|
||||
|
@ -1542,27 +1542,39 @@ gdk_directfb_cairo_surface_destroy (void *data)
|
||||
static cairo_surface_t *
|
||||
gdk_directfb_ref_cairo_surface (GdkDrawable *drawable)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
|
||||
g_return_val_if_fail (GDK_IS_DRAWABLE_IMPL_DIRECTFB (drawable), NULL);
|
||||
GdkDrawableImplDirectFB *impl;
|
||||
IDirectFB *dfb;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
|
||||
g_return_val_if_fail (GDK_IS_DRAWABLE_IMPL_DIRECTFB (drawable), NULL);
|
||||
|
||||
GdkDrawableImplDirectFB *impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
|
||||
IDirectFB *dfb = GDK_DISPLAY_DFB(gdk_drawable_get_display(drawable))->directfb;
|
||||
if (!impl->cairo_surface) {
|
||||
// IDirectFBSurface *surface;
|
||||
// if (impl->surface->GetSubSurface (impl->surface, NULL, &surface) == DFB_OK) {
|
||||
//impl->cairo_surface = cairo_directfb_surface_create (dfb, surface);
|
||||
g_assert( impl->surface != NULL);
|
||||
impl->cairo_surface = cairo_directfb_surface_create (dfb,impl->surface);
|
||||
g_assert( impl->cairo_surface != NULL);
|
||||
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
|
||||
dfb = GDK_DISPLAY_DFB(gdk_drawable_get_display(drawable))->directfb;
|
||||
|
||||
if (!impl->cairo_surface) {
|
||||
IDirectFBSurface *surface;
|
||||
g_assert (impl->surface != NULL);
|
||||
#if defined(CAIRO_VERSION_CODE) && CAIRO_VERSION_CODE >= CAIRO_VERSION_ENCODE(1,5,5)
|
||||
impl->surface->GetSubSurface (impl->surface, NULL, &surface);
|
||||
#else
|
||||
surface = impl->surface;
|
||||
#endif
|
||||
if (surface) {
|
||||
impl->cairo_surface = cairo_directfb_surface_create (dfb, surface);
|
||||
if (impl->cairo_surface) {
|
||||
cairo_surface_set_user_data (impl->cairo_surface,
|
||||
&gdk_directfb_cairo_key, drawable,
|
||||
gdk_directfb_cairo_surface_destroy);
|
||||
// surface->Release (surface);
|
||||
//}
|
||||
} else {
|
||||
cairo_surface_reference (impl->cairo_surface);
|
||||
}
|
||||
#if defined(CAIRO_VERSION_CODE) && CAIRO_VERSION_CODE >= CAIRO_VERSION_ENCODE(1,5,5)
|
||||
surface->Release (surface);
|
||||
#endif
|
||||
}
|
||||
g_assert( impl->cairo_surface != NULL);
|
||||
} else {
|
||||
cairo_surface_reference (impl->cairo_surface);
|
||||
}
|
||||
|
||||
g_assert (impl->cairo_surface != NULL);
|
||||
return impl->cairo_surface;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user