[Interest] Retina displays (and dual monitor setups - and Qt)

Till Oliver Knoll till.oliver.knoll at gmail.com
Fri Jun 15 17:30:44 CEST 2012


Hi,

Did anyone of you get his or her hands on a new MacBook Pro Retina display? :)

(for the sake of this discussion: assume any high-DPI device)

To my understanding after reading several news about it the OS does
the proper up-scaling for the high ~220 DPI of the Retina display,
such that an existing application looks "about the same size" like on
an equivalent sized monitor with "normal" DPI (we leave
high-resolution pixmaps out of the discussion for the time being, for
sake of simplicity).

So for a "non-retina aware" application every pixel is doubled, but
the physical size on the screen remains the same (when compared to a
screen with half the resolution). Text should be automatically sized
correspondingly, and fully take advantage of the higher resolution.
Pixmaps are also scaled (and unless a "high-resolution" version is
provided as well, they look blurry - but as mentioned, let's take this
aside for the time being).

According to this (german) article:

  http://www.heise.de/mac-and-i/artikel/Angetestet-MacBook-Pro-Retina-1618307.html

that also plays nicely together when e.g. moving a dialog from a
Retina display to a connected dual monitor with a normal (much lower)
DPI resolution: OS X will draw the overlapping parts with their
respective DPI scaling, without the application noticing.

That is (and now we come to the Qt related part of this post), as long
as the application uses the proper Cocoa APIs for drawing their
content!

The first thing which came to my mind is the drawing engine which
could cause problems here: "raster" vs "native". Assuming that the
"native" paint engine would use the Cocoa logical "points" as drawing
unit, and would use the appropriate Cocoa calls, also a Qt application
should be automagically be scaled by the OS (even when dragged across
screens with different DPI).

However what does the "raster" engine do? Does it request a "pixmap"
from the underlying native paint engine, and does all the
drawing/scaling therein itself? So I'm afraid Qt applications with a
"raster" engine would look "twice as tiny" on a Retina display?


And what about QML? Doesn't it also use the "raster engine" under the
hood, or does at least work similar ("get one huge paint sheet, draw
everything yourself therein, not using any native text/paint calls")?


Any thoughts? :)


Have a nice week-end,
  Oliver



More information about the Interest mailing list