cocoa_common: add HiDPI/retina support
commitc968bdc3af16ee61b800028ad24f7e499a31c416
authorStefano Pigozzi <stefano.pigozzi@gmail.com>
Tue, 7 Aug 2012 08:31:39 +0000 (7 10:31 +0200)
committerUoti Urpala <uau@mplayer2.org>
Fri, 10 Aug 2012 20:17:36 +0000 (10 23:17 +0300)
treea97537a0a3cdb4bbbda5ca53bffd5e95e4304ce2
parent620683d2d786157194a37fc694e4f727fecb35d7
cocoa_common: add HiDPI/retina support

With a HiDPI screen, for performance and backwards compatibility
reasons, AppKit requests an OpenGL surface with a pixel number that
equals the user points number. After the image is rendered to this
smaller surface, it is upscaled so that its dimensions are comparable
across screens of different DPIs. The applied scaling is not that good
and makes the video/subtitles blurry; this is not acceptable for a
video player.

Request AppKit to use a high resolution OpenGL surface to back the
mplayer2 OpenGL view. Also set the window pixel size information
correctly in the VO object by converting user points to actual pixels.

All the system version checks are done at runtime so that the feature
is available on OSX 10.7 even with a binary compiled with older SDKs.
libvo/cocoa_common.m
libvo/osx_common.c
libvo/osx_common.h