GNOME Bugzilla – Bug 619468
DirectFB backend fixes
Last modified: 2010-10-15 10:13:14 UTC
So I'm opening another bug on the directfb backend, because this one does not match one of the others already opened... In fact, it matches several others... I've been trying to fix the directfb backend for my own use the last few weeks and rebased my work on the last master commit. And here is the result : http://git.potipota.net/cgi-bin/cgit.cgi/gtk+/log/?h=directfb-fixes It's of course clonable from git://git.potipota.net/gtk+ (might be a little slow). Several bugs remains, mostly on the scrolling, probably a few others on window resize, and also on the dragging events. I'm looking for any comment/review/help. For example, I spend a few days on the scrolling bug and didn't find/understand how to fix it, any idea is welcome. Hoping the directfb backend will work again soon ;) Thanks for your help !
The directfb backend has been removed form GTK 3
Reopening... Lionel, can you rebase your patch-set so that it applies cleanly on top of gtk-2-90 and gtk-2-22 branches? Then I can commit them. We should also try to get commit access for you so that you can work on the DirectFB backend more easily. If the backend can be made to work cleanly in the branches mentioned, then we can still propose to add it back for GTK+ 3.0.
not without a clear maintainer
That's fair enough. I won't have enough time for this, so I am out of this game. But if Lionel or Michael Emmel or anyone else volunteers to maintain the port, then they should also get commit access. Otherwise patches will stay uncommitted until they won't apply any longer, which is what happened over the past few years.
After this work I worked on the Gtk/Webkit port and went on to write my own webbrowser as a "smaller" project. Needless to say I simply don't have the time.
I will rebase ASAP, but for remaining problems I need some help. I could also spend some time on WebKit, once we have something more stable.
*** Bug 628083 has been marked as a duplicate of this bug. ***
Please RE opening Directfb~~~~~~~~~~~~~Need it Here is good DEBUG IDE, please Debug it. http://www.wretch.cc/blog/fatalfeel/656116
If anyone fix it please let me know~~ fatalfeel@hotmail.com
I try many version, the Last Gtk Directfb version is 2.17.2 works fine. Maybe you can refer to it
In Ubuntu Frame Buffer mode I find if mouse out of text window the inside text rect will clear again maybe you can try this one (In reply to comment #0) > So I'm opening another bug on the directfb backend, because this one does not > match one of the others already opened... In fact, it matches several others... > I've been trying to fix the directfb backend for my own use the last few weeks > and rebased my work on the last master commit. And here is the result : > http://git.potipota.net/cgi-bin/cgit.cgi/gtk+/log/?h=directfb-fixes > It's of course clonable from git://git.potipota.net/gtk+ (might be a little > slow). > Several bugs remains, mostly on the scrolling, probably a few others on window > resize, and also on the dragging events. > I'm looking for any comment/review/help. For example, I spend a few days on the > scrolling bug and didn't find/understand how to fix it, any idea is welcome. > Hoping the directfb backend will work again soon ;) > Thanks for your help !
GTK+-2.18.5 Directfb important fix gdkdrawable-directfb.c cairo_surface_t * _gdk_windowing_create_cairo_surface (GdkDrawable *drawable, int width, int height) { /*GdkDrawableImplDirectFB *impl; IDirectFB *dfb; cairo_surface_t *ret; impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable); dfb = GDK_DISPLAY_DFB (gdk_drawable_get_display (drawable))->directfb; ret = cairo_directfb_surface_create (dfb, impl->surface); cairo_surface_set_user_data (ret, &gdk_directfb_cairo_key, drawable, gdk_directfb_cairo_surface_destroy); return ret;*/ GdkDrawableImplDirectFB *impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable); if (!impl->cairo_surface) { IDirectFB *dfb; IDirectFBSurface *surface; DFBSurfaceDescription desc = { .flags = ( DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT), .width = width, .height = height }; dfb = GDK_DISPLAY_DFB (gdk_drawable_get_display (drawable))->directfb; int depth = gdk_drawable_get_depth (drawable); switch (depth) { case 1: desc.pixelformat = DSPF_A1; break; case 8: desc.pixelformat = DSPF_A8; break; case 16: desc.pixelformat = DSPF_RGB16; break; case 24: desc.pixelformat = DSPF_RGB32; break; case 32: desc.pixelformat = DSPF_ARGB; break; default: return NULL; } if (dfb->CreateSurface (dfb, &desc, &surface) == DFB_OK) { 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); } else { surface->Release (surface); return NULL; } impl->surface = surface; } else return NULL; } else cairo_surface_reference (impl->cairo_surface); return impl->cairo_surface; } static cairo_surface_t * gdk_directfb_ref_cairo_surface (GdkDrawable *drawable) { /*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); 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); } #if defined(CAIRO_VERSION_CODE) && CAIRO_VERSION_CODE >= CAIRO_VERSION_ENCODE(1,5,5) surface->Release (surface); #endif } } else { cairo_surface_reference (impl->cairo_surface); } g_assert (impl->cairo_surface != NULL); return impl->cairo_surface;*/ GdkDrawableImplDirectFB *impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable); if (GDK_IS_WINDOW_IMPL_DIRECTFB (drawable) && GDK_WINDOW_DESTROYED (impl->wrapper)) return NULL; if (!impl->cairo_surface) { int width, height; gdk_drawable_get_size (drawable, &width, &height); impl->cairo_surface = _gdk_windowing_create_cairo_surface (drawable, width, height); if (impl->cairo_surface) { cairo_surface_set_user_data(impl->cairo_surface, &gdk_directfb_cairo_key, drawable, gdk_directfb_cairo_surface_destroy); } } else cairo_surface_reference (impl->cairo_surface); return impl->cairo_surface; } gdkwindow-directfb.c void _gdk_windowing_window_init (void) { GdkWindowObject *private; GdkWindowImplDirectFB *impl; DFBDisplayLayerConfig dlc; g_assert (_gdk_parent_root == NULL); _gdk_display->layer->GetConfiguration (_gdk_display->layer, &dlc); _gdk_parent_root = g_object_new (GDK_TYPE_WINDOW, NULL); private = GDK_WINDOW_OBJECT (_gdk_parent_root); private->impl = g_object_new (_gdk_window_impl_get_type (), NULL); private->impl_window = private; impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl); private->window_type = GDK_WINDOW_ROOT; private->state = 0; private->children = NULL; private->viewable = TRUE; // impl->drawable.paint_region = NULL; impl->gdkWindow = _gdk_parent_root; impl->window = NULL; impl->drawable.abs_x = 0; impl->drawable.abs_y = 0; impl->drawable.width = dlc.width; impl->drawable.height = dlc.height; impl->drawable.wrapper = GDK_DRAWABLE (private); /* custom root window init */ { DFBWindowDescription desc; desc.flags = 0; /*XXX I must do this now its a bug ALPHA ROOT*/ desc.flags = DWDESC_CAPS; desc.caps = 0; desc.caps |= DWCAPS_NODECORATION; desc.caps |= DWCAPS_ALPHACHANNEL; desc.flags |= ( DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_POSX | DWDESC_POSY ); desc.posx = 0; desc.posy = 0; desc.width = dlc.width; desc.height = dlc.height; create_directfb_window (impl,&desc,0); g_assert(impl->window != NULL); g_assert(impl->drawable.surface != NULL ); } impl->drawable.surface->GetPixelFormat(impl->drawable.surface,&impl->drawable.format); private->depth = DFB_BITS_PER_PIXEL(impl->drawable.format); _gdk_window_update_size (_gdk_parent_root); /* Now we can set up the system colormap */ gdk_drawable_set_colormap (GDK_DRAWABLE (_gdk_parent_root),gdk_colormap_get_system()); }
Here is the update for GTK+ 2.22 : http://git.potipota.net/cgi-bin/cgit.cgi/gtk+/log/?h=gtk-2-22-directfb The GTK+ 2.90/3.0 version will come later, I have to reverse the removal of the directfb backend. JesseStone: I would prefer a proper patch rather than copy/paste and a little bit of explanation.
Would you stay your msn or skype or email to me mine msn & email = fatalfeel@hotmail.com (In reply to comment #0) > So I'm opening another bug on the directfb backend, because this one does not > match one of the others already opened... In fact, it matches several others... > I've been trying to fix the directfb backend for my own use the last few weeks > and rebased my work on the last master commit. And here is the result : > http://git.potipota.net/cgi-bin/cgit.cgi/gtk+/log/?h=directfb-fixes > It's of course clonable from git://git.potipota.net/gtk+ (might be a little > slow). > Several bugs remains, mostly on the scrolling, probably a few others on window > resize, and also on the dragging events. > I'm looking for any comment/review/help. For example, I spend a few days on the > scrolling bug and didn't find/understand how to fix it, any idea is welcome. > Hoping the directfb backend will work again soon ;) > Thanks for your help !
(Please do not fullquote complete previous comments and please don't answer above the quote. Thanks!)
Lionel really do a good job. just download .gz and replace gdk\directfb rebuild , works fine. But still have question in png image, lack of some pixels~
Lionel, can you please create a patch-set from your tree (using git format-patch) that I can apply against the gtk-2-22 branch? Thanks.
Were do you want me to send it ? Right here in bugzilla ?
You could attach a tarball here or point me to a link where I can download it.
Created attachment 169134 [details] GTK+ 2.22 directfb patchs
Here you go. http://potipota.net/~djdeath/gtk-directfb-2.22-patchs.tar.gz There is also the git repository (as mentionned above) : http://git.potipota.net/cgi-bin/cgit.cgi/gtk+/log/?h=gtk-2-22-directfb
If could, please help us debug png problem. here is a debug way~ http://www.wretch.cc/blog/fatalfeel/656116
JesseStone: If you have a particular issue, please open another bug.
JesseStone: Bugzilla is not a forum. Please stop spamming this bug.
Merged and pushed to gtk-2-22. Closing as FIXED.
Created attachment 172395 [details] black screen
why words will be covered by black screen in GTK+ 2.16.x directfb? Could anyone help me?
JesseStone: PLEASE DO READ, for example comment 23 clearly tells you to go somewhere else. If you continue ignoring it I might disable your Bugzilla account, as this is not the only bug report where you show this behaviour.