modules/graphics/src/main/java/com/sun/glass/ui/win/WinApplication.java

Print this page

        

*** 36,48 **** import java.security.AccessController; import java.security.PrivilegedAction; final class WinApplication extends Application implements InvokeLaterDispatcher.InvokeLaterSubmitter { static float overrideUIScale; - static float overrideRenderScale; - static float minDPIScale; - static boolean forceIntegerRenderScale; private static boolean getBoolean(String propname, boolean defval, String description) { String str = System.getProperty(propname); if (str == null) { str = System.getenv(propname); --- 36,45 ----
*** 78,107 **** System.out.println(description+val); } return val; } ! private static native void initIDs(float overrideUIScale, ! float overrideRenderScale, ! float minDPIScale, ! boolean forceIntegerRenderScale); static { // This loading of msvcr120.dll and msvcp120.dll (VS2013) is required when run with Java 8 // since it was build with VS2010 and doesn't include msvcr120.dll in its JRE. // Note: See README-builds.html on MSVC requirement: VS2013 is required. AccessController.doPrivileged(new PrivilegedAction<Void>() { public Void run() { verbose = Boolean.getBoolean("javafx.verbose"); if (PrismSettings.allowHiDPIScaling) { overrideUIScale = getFloat("glass.win.uiScale", -1.0f, "Forcing UI scaling factor: "); ! overrideRenderScale = getFloat("glass.win.renderScale", -1.0f, "Forcing Rendering scaling factor: "); ! minDPIScale = getFloat("glass.win.minHiDPI", 1.5f, "Threshold to enable UI scaling factor: "); ! forceIntegerRenderScale = getBoolean("glass.win.forceIntegerRenderScale", true, "forcing integer rendering scale"); } else { ! overrideUIScale = overrideRenderScale = 1.0f; ! minDPIScale = Float.MAX_VALUE; ! forceIntegerRenderScale = false; } try { NativeLibLoader.loadLibrary("msvcr120"); } catch (Throwable t) { if (verbose) { --- 75,105 ---- System.out.println(description+val); } return val; } ! private static native void initIDs(float overrideUIScale); static { // This loading of msvcr120.dll and msvcp120.dll (VS2013) is required when run with Java 8 // since it was build with VS2010 and doesn't include msvcr120.dll in its JRE. // Note: See README-builds.html on MSVC requirement: VS2013 is required. AccessController.doPrivileged(new PrivilegedAction<Void>() { public Void run() { verbose = Boolean.getBoolean("javafx.verbose"); if (PrismSettings.allowHiDPIScaling) { overrideUIScale = getFloat("glass.win.uiScale", -1.0f, "Forcing UI scaling factor: "); ! // We only parse these if verbose, to inform the user... ! if (PrismSettings.verbose) { ! getFloat("glass.win.renderScale", -1.0f, ! "(No longer supported) Rendering scaling factor: "); ! getFloat("glass.win.minHiDPI", 1.5f, ! "(No longer supported) UI scaling threshold: "); ! getBoolean("glass.win.forceIntegerRenderScale", true, ! "(No longer supported) force integer rendering scale"); ! } } else { ! overrideUIScale = 1.0f; } try { NativeLibLoader.loadLibrary("msvcr120"); } catch (Throwable t) { if (verbose) {
*** 117,127 **** } Application.loadNativeLibrary(); return null; } }); ! initIDs(overrideUIScale, overrideRenderScale, minDPIScale, forceIntegerRenderScale); } private final InvokeLaterDispatcher invokeLaterDispatcher; WinApplication() { // Embedded in SWT, with shared event thread --- 115,125 ---- } Application.loadNativeLibrary(); return null; } }); ! initIDs(overrideUIScale); } private final InvokeLaterDispatcher invokeLaterDispatcher; WinApplication() { // Embedded in SWT, with shared event thread
*** 267,278 **** @Override public Pixels createPixels(int width, int height, IntBuffer data) { return new WinPixels(width, height, data); } @Override ! public Pixels createPixels(int width, int height, IntBuffer data, float scale) { ! return new WinPixels(width, height, data, scale); } @Override protected int staticPixels_getNativeFormat() { return WinPixels.getNativeFormat_impl(); } --- 265,276 ---- @Override public Pixels createPixels(int width, int height, IntBuffer data) { return new WinPixels(width, height, data); } @Override ! public Pixels createPixels(int width, int height, IntBuffer data, float scalex, float scaley) { ! return new WinPixels(width, height, data, scalex, scaley); } @Override protected int staticPixels_getNativeFormat() { return WinPixels.getNativeFormat_impl(); }