[OpenJDK 2D-Dev] [8] Request for review: 8000629 [macosx] Blurry rendering with Java 7 on Retina display (original) (raw)
Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Mar 27 16:12:09 UTC 2013
- Previous message: [OpenJDK 2D-Dev] [8] Request for review: 8000629 [macosx] Blurry rendering with Java 7 on Retina display
- Next message: [OpenJDK 2D-Dev] [8] Request for review: 8000629 [macosx] Blurry rendering with Java 7 on Retina display
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 3/27/13 6:52 PM, Anthony Petrov wrote:
(there's also other usages of int in shared code) Why do we use integer values here? There's no 100% guarantee that the scale factor is integer on Mac (or other platforms when we support HiDPI rendering on them). At least native APIs operate with float values. Yes, but it is unclear how we could convert points to pixels when the scale factor of 1.5, for example. If we get xx.xx scale in the future, additional work will be required. For now the simplest way just used.
Also, I wonder if we have to maintain the double precision for the scale factor in native functions nativeSetScale/nativeGetScaleFactor (and in Region.java, too). Would float values work fine? I use double precision everywhere, because SunGraphics2D in the transform uses double precision, and I cast double to int where it is safe.
src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java 444 //Temporary disable this logic and use some magic constrain. 457 return getMaxTextureSize() / (getDevice().getScaleFactor() * 2); I believe that this workaround is unrelated to the core retina-support fix and should be omitted from it. Without this change, applets unsuitable for use in hidpi mode under quartz-debug(our sqe use it also). Moreover I assume, that the display bounds constrain is incorrect anyway. -- best regards, Anthony On 3/26/2013 19:33, Sergey Bylokhov wrote: Hello, Please review the fix for jdk 8. Change adds initial support of hidpi(mostly on 2d side). In the fix scale was added to the surface data/CGraphicsDevice /CGLLayer. This scale factor maps virtual coordinates to physical pixels. This change doesn't add support of hidpi to aqua l&f and doesn't add support of dynamic change of scale factor.
Bug: http://bugs.sun.com/bugdatabase/viewbug.do?bugid=8000629 Webrev can be found at: http://cr.openjdk.java.net/~serb/8000629/webrev.06 -- Best regards, Sergey.
-- Best regards, Sergey.
- Previous message: [OpenJDK 2D-Dev] [8] Request for review: 8000629 [macosx] Blurry rendering with Java 7 on Retina display
- Next message: [OpenJDK 2D-Dev] [8] Request for review: 8000629 [macosx] Blurry rendering with Java 7 on Retina display
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]