GNOME Bugzilla – Bug 763779
[PATCH] quartz: fix pixelated image surfaces in retina/hidpi mode
Last modified: 2016-03-23 15:39:38 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().