GdkGLContext for Mac OS X Quartz backend patches



I've already showed these to Emmanuel last week on IRC, but want to make sure they're ready to merge soonish so they don't bitrot...

Unfortunately my gtk+ patch has already bitrotted since last weekend; the 'update' method has been removed on master which I was relying on to call the NSOpenGLContext's update method after a window resize; this leaves GL-rendered windows broken after resizing.

What would be a recommended place to insert that update call instead?


I also have not yet figured out why the gtk3-demo 'golden triangle' demo updates the screen properly on update, but the gdkgears demo does not. Help with that would be welcome. :)


Patches to gtk+ on bug:
https://bugzilla.gnome.org/show_bug.cgi?id=740199

Patch to cairo on bug:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=69796

The cairo patch is provisional and may need further work; basic problem is that a quartz surface created for a window takes its device scale into account on the Quartz (CGContext) side but the cairo side doesn't know about it and treats it like a 1x-scaled surface. This was leading many things to 'work' in GTK+ due to the gdk-quartz cairo stuff not actually applying device scale on surfaces either... but offscreen surfaces used for scrolling and GL rendering ended up really treated as 1x leading to low-resolution widgets being displayed in some places. In my gtk+ patches I fix gdk-quartz to set the window's device scale resolution on the cairo surface, which requires this cairo fix (or one very like it). Possibly the cairo fix should set the cairo-level device scaling on the surface as well, which I think would be redundant in the GTK+ case but might be a wise default.


Thanks!

-- brion


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