Re: GNOME 2.3.x DirectFB support



On Mon, 2003-05-19 at 19:06, Jeff Waugh wrote:
> > Not so much tied to X11, more that they need some kind of IPC system.
> 
> startup-notification and libwnck are pretty X-specific.

Yes, unfortunately this is the case.

I was able to interest some more people from #gnome-de for directfb (at
least to have them try it for at least one time) and they all seem to be
pretty much impressed about it.

Now that DirectFB has good support for GDK and furthermore GNOME is one
of the biggest projects around GTK+ it would be pretty cool to have
support for it.

We all know that GTK+ has various backends for GDK and an ideal GNOME
application/library if possible should make use of GDK as much as
possible rather than falling back to X11 calls so portability becomes
easy.

I was pretty much impressed what such a lowlevel is able to do.

- Real Transparency (not like under X11 where we need to allocate a
  big chunk of memory and simulate transparency inside that
  application by blitting the bottom root of the window inside our
  own memory) see gnome-terminal as example when you enable
  transparent effects then it eats a lot of memory that we could use
  wisely for other things.
- AA support through pango (freetype and fontconfig) yes AA fonts
  inside a directfb window, when you compile gtk+ with directfb
  backend and have it run then you are able to enjoy anti aliased
  fonts.
- Real Shadow effect, when you compile dfbterm for example (CVS) then
  you get the shadow thrown on the desktop like macosX.

- Random benefits: Less memory consumptions (no loading of X, no fake
  transparency), no startuptimes for X (which usually takes a few
  seconds too. And if it works nicely one day then you can easily get
  rid of nearly 130mb of X11 installation in favor to 200-300 kb of
  directfb libraries. My X11 installation is around 130mb where 57mb
  are just fonts. Another nice effect is that it has the
  console+desktop effekt that many of you people may know from former
  amiga times (or atari or whatever). You simply boot the kernel, the
  init scripts and in no time are in a your desktop. Basically due to
  framebuffer your console and desktop become one. I heard many times
  that various people like the idea getting rid of console.

Sadly but of course there are a bunch of things you loose when using
directfb such as the networklayer around X11 and another sideeffect is
that not every plattform supports framebuffer. But on the otherhand no
one should be taken away the rights to continue using X11. I only nicely
ask the developers that during their programming that they should use
GDK calls in favor to X11 calls whenever possible so it makes it easier
for future ports. Less work for other people.

Maybe I can interest the one or others of you to give directfb a try so
I would like to give some little hints on howto get it running on your
system without wasting to much time.

a) go on www.directfb.org and grab the entire CVS tree
b) apply fusion patch to your kernel (backup the old one for easy
   restoring). this patch is needed to allow directfb to run multiple
   applications otherwise directfb deals only with one app at one
   time.
c) compile the kernel with framebuffer and fusion support (maybe you
   like to compile framebuffer also for console output it looks cool
   when booting linux with 1024x768x32 and see the full contrast and
   nice colors).
d) compile directfb library (it has pkgconfig support) and choose a
   temporary dir which you can easily remove later). I put it in my
   gnome directory (made a backup before so I can restore it).
e) patch the gtk+ source (CVS HEAD or tarball) with the gdk-directfb
   patches. Please note that gtk+ when doing a ./configure --help
   shows --with-gdktarget=(x11, linux-fb, w32). note that linux-fb in
   this case is not the same as directfb. from investigations with
   someone else in the #gnome-de channel linux-fb accesses the kernel
   framebuffer and not the directfb library. so you need to patch it
   and configure it with =directfb instead.
f) now enjoy 'gtk-demo' simply run it in the console :) also try the
   dfbterm it throws a nice shadow effect and allows you to run other
   apps (even directfb related).

It's worth the time and education. Please don't mix it with the
XdirectFB because this is a driver for framebuffer ontop of X11 (should
work too and probably makes compiling GNOME easy as usually) but the
point is staying X11 independant. When compiling other stuff always use
--without-x so you make sure that your app doesn't put X11 related
stuff, such as headers etc. inside the app.

Have Fun it's really worth the education. In worst case delete your
gnome/linuxsource dir and move back the backups for it.

greets,

Ali Akcaagac




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]