GSoC 2013: Doublebuffered painting!

Thanks to a fix that Eric applied to Opal's handling of painting CGBitmapContext->CGImage on top of another CGContext, the backend now actually paints something sensible on a doublebuffered window. Hooray!

Well, actually, it only paints something sensible on a menu window. And as soon as the backend has to paint an update, for some reason the updated stuff is painted (mostly) upside down. I've tested with the Gtk theme, and the in-window menus also seem to be updated upside down.

I also seem to be unable to get menu items to be wider despite various hacks when it comes to fonts. It seems that OpalFontInfo's -widthOfString: is not used at all, and a series of calls to -advancementForGlyph: is instead performed, with no effect on the width of the menu whatsoever.

I'll explore further what's wrong with both of these issues tomorrow; preparing for a job interview today will take the rest of this day.

Note: I did not commit my yesterday's work described above, as it mostly consists of hacks that have no useful effect onscreen. Eric's changes to Opal, combined with a change of #if 0 to #if 1 in gnustep-back's OpalSurface's init method do produce some of the visible changes described above.


One thought on “GSoC 2013: Doublebuffered painting!

Leave a Reply

Your email address will not be published. Required fields are marked *


What is 12 + 5 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

This site uses Akismet to reduce spam. Learn how your comment data is processed.