After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763779 - [PATCH] quartz: fix pixelated image surfaces in retina/hidpi mode
[PATCH] quartz: fix pixelated image surfaces in retina/hidpi mode
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Quartz
3.19.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtk-quartz maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-03-16 19:12 UTC by Christoph Reiter (lazka)
Modified: 2016-03-23 15:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
quartz: fix pixelated image surfaces in retina/hidpi mode (2.63 KB, patch)
2016-03-16 19:12 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Christoph Reiter (lazka) 2016-03-16 19:12:57 UTC
Created attachment 324134 [details] [review]
quartz: fix pixelated image surfaces in retina/hidpi mode

gtk+ currently depends on the scaling factor and the cairo device scale
of both the backend surfaces and image surfaces to be equal.

Until now we didn't apply a cairo device scale at all and depended on the
automatic scaling of CGContexts. This works when drawing with cairo but
fails in case of image surfaces, which get requested at a too small size.

To make the quartz backend behave more like the X11 one, set the cairo device
scale on the surface in gdk_quartz_ref_cairo_surface(). As this conflicts
with the default scaling done by CGContext (we would get double scaling)
undo the CGContext scaling using CGContextScaleCTM().