Hi,This is a work-in-progress patch to provide a GDK backend for AbstractGraphics2D and also to ready the codebase for further Java2D development.
It turned out that making a GDK "backend" was (almost) as simple as moving GdkGraphics under AbstractGraphics2D in the inheritance hierarchy. Graphics-using applications will see little change in performance/correctness with this patch, since GdkGraphics overrides all of AbstractGraphics2D's Graphics methods.
I also removed all mention of GdkGraphics2D and Cairo. If it turns out that we can accelerate AbstractGraphics2D with Cairo methods, then all we'll need to do is bump the GTK release requirement to 2.8 (which brings in Cairo headers and libraries by default), and move any code we need from GdkGraphics2D into Graphics. For now, I wanted to eliminate the complexity of --enable-gtk-cairo and -Dgnu.java.awt.peer.gtk.Graphics while we experiment with AbstractGraphics2D.
As you can see by commenting out GdkGraphics.fillRect (which causes AbstractGraphics2D's fillRect to be activated), pixel colors are all wrong. I haven't investigated why yet.
Comments? If people don't consider this too drastic, I'll finish it off and commit it this week.
Tom
peer-gdk-graphics2d-backend.patch.gz
Description: GNU Zip compressed data
