rendering-cleanup



Hi,

As many of you have already noticed, I've been frantically hacking
away on my Gtk rendering-cleanup branch[1]. The branch is an attempt
to move all GTK drawing to Cairo and remove all the outdated APIs that
exist for rendering, including, but not limited to:
- GdkRGB
- GdkImage
- gdk_draw_*()
- GdkPangoRenderer
- GdkGC
More things could be removed (GdkColormap and GdkColor.pixel come to
mind), but those aren't urgent for 3.0 IMO, so I didn't remove them.
I did do this because the task of implementing and maintaining such a
complex rendering API as Gdk2.0 provides is a very daunting task and
looking at the non-X11 backends also quite complex, while Cairo
provides a much smaller API and has fallbacks for almost everything.

The work is done and the code runs now. Well, at least testgtk and
gtk3-demo do. On X11. I'd be happy if others could take it for a spin
and find issues with it or even have a go at Quartz and Win32 code.

Even though this is a huge amount of API that is removed - it's close
to 30.000 lines of code including docs - there don't seem to be a lot
of users inside GNOME. Most of the users are really old parts of the
code and in those cases switching to Cairo should be a reasonably
easy. In fact, a lot of the functions can be replaced using similar
functions from Cairo in a copy/paste style. Also, I'd like to point
out that no API was changed. I only removed functions. So a proper
transition from Gtk2 using deprecations is easily possible.

So what do I intend to do next?
1) Port some applications - the bigger users - to not use these
functions anymore. That way I'll both review my branch and get some
apps fixed.
2) Cherry-pick the cleanup work into master and gtk-2-22
3) Get an ok to merge the API cleanup to master (or at least
partially) and deprecate related functions for 2.22.

The work is tracked in bug 624255[2] and further discussions should
happen there. This mail is just intended to make everyone aware of the
effort and to answer any questions you might have.

Also, I'm aware that we are very close to a release. I'd understand if
that'd make people not want to merge it. But I think it's worth it and
the impact is very small compared to the other changes in Gtk3.


And last but not least, some diffstats:

Whole patchset:
 146 files changed, 2730 insertions(+), 29384 deletions(-)

gdk/ subdirectory:
 64 files changed, 590 insertions(+), 22215 deletions(-)
This should prove that it's pretty much just removing code.

gtk/ subdirectory:
 37 files changed, 1866 insertions(+), 3373 deletions(-)
Half of that is fixing the default style, the other half is updating
widgets to use Cairo.

Cheers,
Benjamin


1: http://git.gnome.org/browse/gtk+/log/?h=rendering-cleanup
2: https://bugzilla.gnome.org/show_bug.cgi?id=624255


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