< prev index next >

modules/javafx.graphics/src/main/java/com/sun/prism/impl/PrismSettings.java

Print this page




  39  * Contains the runtime arguments used by Prism.
  40  */
  41 public final class PrismSettings {
  42 
  43     public static final boolean verbose;
  44     public static final boolean debug;
  45     public static final boolean trace;
  46     public static final boolean printAllocs;
  47     public static final boolean isVsyncEnabled;
  48     public static final boolean dirtyOptsEnabled;
  49     public static final boolean occlusionCullingEnabled;
  50     public static final boolean scrollCacheOpt;
  51     public static final boolean threadCheck;
  52     public static final boolean cacheSimpleShapes;
  53     public static final boolean cacheComplexShapes;
  54     public static final boolean useNewImageLoader;
  55     public static final List<String> tryOrder;
  56     public static final int prismStatFrequency;
  57     public static final boolean doNativePisces;
  58     public static final boolean useMarlinRasterizer;

  59     public static final String refType;
  60     public static final boolean forceRepaint;
  61     public static final boolean noFallback;
  62     public static final boolean showDirtyRegions;
  63     public static final boolean showOverdraw;
  64     public static final boolean printRenderGraph;
  65     public static final int minRTTSize;
  66     public static final int dirtyRegionCount;
  67     public static final boolean disableBadDriverWarning;
  68     public static final boolean forceGPU;
  69     public static final int maxTextureSize;
  70     public static final int primTextureSize;
  71     public static final boolean disableRegionCaching;
  72     public static final boolean forcePow2;
  73     public static final boolean noClampToZero;
  74     public static final boolean disableD3D9Ex;
  75     public static final boolean allowHiDPIScaling;
  76     public static final long maxVram;
  77     public static final long targetVram;
  78     public static final boolean poolStats;


 198         if (order != null) {
 199             tryOrderArr = split(order, ",");
 200         } else {
 201             if (PlatformUtil.isWindows()) {
 202                 tryOrderArr = new String[] { "d3d", "sw" };
 203             } else if (PlatformUtil.isMac()) {
 204                 tryOrderArr = new String[] { "es2", "sw" };
 205             } else if (PlatformUtil.isIOS()) {
 206                 tryOrderArr = new String[] { "es2" };
 207             } else if (PlatformUtil.isAndroid()) {
 208                     tryOrderArr = new String[] { "es2" };
 209             } else if (PlatformUtil.isLinux()) {
 210                 tryOrderArr = new String[] { "es2", "sw" };
 211             } else {
 212                 tryOrderArr = new String[] { "sw" };
 213             }
 214         }
 215 
 216         tryOrder = Collections.unmodifiableList(Arrays.asList(tryOrderArr));
 217 
 218         useMarlinRasterizer = getBoolean(systemProperties, "prism.marlinrasterizer", false);

 219         if (useMarlinRasterizer) {
 220             doNativePisces = false;
 221         } else {
 222             String npprop = systemProperties.getProperty("prism.nativepisces");
 223             if (npprop == null) {
 224                 doNativePisces = PlatformUtil.isEmbedded() || !PlatformUtil.isLinux();
 225             } else {
 226                 doNativePisces = Boolean.parseBoolean(npprop);
 227             }
 228         }
 229 
 230         String primtex = systemProperties.getProperty("prism.primtextures");
 231         if (primtex == null) {
 232             primTextureSize = PlatformUtil.isEmbedded() ? -1 : 0;
 233         } else if (primtex.equals("true")) {
 234             primTextureSize = -1;
 235         } else if (primtex.equals("false")) {
 236             primTextureSize = 0;
 237         } else {
 238             primTextureSize =


 245 
 246         forcePow2 = getBoolean(systemProperties, "prism.forcepowerof2", false);
 247         noClampToZero = getBoolean(systemProperties, "prism.noclamptozero", false);
 248 
 249         allowHiDPIScaling = getBoolean(systemProperties, "prism.allowhidpi", true);
 250 
 251         maxVram = getLong(systemProperties, "prism.maxvram", 512 * 1024 * 1024,
 252                           "Try -Dprism.maxvram=<long>[kKmMgG]");
 253         targetVram = getLong(systemProperties, "prism.targetvram", maxVram / 8, maxVram,
 254                              "Try -Dprism.targetvram=<long>[kKmMgG]|<double(0,100)>%");
 255         poolStats = getBoolean(systemProperties, "prism.poolstats", false);
 256         poolDebug = getBoolean(systemProperties, "prism.pooldebug", false);
 257 
 258         if (verbose) {
 259             System.out.print("Prism pipeline init order: ");
 260             for (String s : tryOrder) {
 261                 System.out.print(s+" ");
 262             }
 263             System.out.println("");
 264             if (useMarlinRasterizer) {
 265                 System.out.println("Using Marlin rasterizer");

 266             } else {
 267                 String piscestype = (doNativePisces ? "native" : "java");
 268                 System.out.println("Using " + piscestype + "-based Pisces rasterizer");
 269             }
 270             printBooleanOption(dirtyOptsEnabled, "Using dirty region optimizations");
 271             if (primTextureSize == 0) {
 272                 System.out.println("Not using texture mask for primitives");
 273             } else if (primTextureSize < 0) {
 274                 System.out.println("Using system sized mask for primitives");
 275             } else {
 276                 System.out.println("Using "+primTextureSize+" sized mask for primitives");
 277             }
 278             printBooleanOption(forcePow2, "Forcing power of 2 sizes for textures");
 279             printBooleanOption(!noClampToZero, "Using hardware CLAMP_TO_ZERO mode");
 280             printBooleanOption(allowHiDPIScaling, "Opting in for HiDPI pixel scaling");
 281         }
 282 
 283         /*
 284          * Setting for maximum texture size. Default is 4096.
 285          * This will clamp the limit reported by the card to the specified




  39  * Contains the runtime arguments used by Prism.
  40  */
  41 public final class PrismSettings {
  42 
  43     public static final boolean verbose;
  44     public static final boolean debug;
  45     public static final boolean trace;
  46     public static final boolean printAllocs;
  47     public static final boolean isVsyncEnabled;
  48     public static final boolean dirtyOptsEnabled;
  49     public static final boolean occlusionCullingEnabled;
  50     public static final boolean scrollCacheOpt;
  51     public static final boolean threadCheck;
  52     public static final boolean cacheSimpleShapes;
  53     public static final boolean cacheComplexShapes;
  54     public static final boolean useNewImageLoader;
  55     public static final List<String> tryOrder;
  56     public static final int prismStatFrequency;
  57     public static final boolean doNativePisces;
  58     public static final boolean useMarlinRasterizer;
  59     public static final boolean useMarlinRasterizerDP;
  60     public static final String refType;
  61     public static final boolean forceRepaint;
  62     public static final boolean noFallback;
  63     public static final boolean showDirtyRegions;
  64     public static final boolean showOverdraw;
  65     public static final boolean printRenderGraph;
  66     public static final int minRTTSize;
  67     public static final int dirtyRegionCount;
  68     public static final boolean disableBadDriverWarning;
  69     public static final boolean forceGPU;
  70     public static final int maxTextureSize;
  71     public static final int primTextureSize;
  72     public static final boolean disableRegionCaching;
  73     public static final boolean forcePow2;
  74     public static final boolean noClampToZero;
  75     public static final boolean disableD3D9Ex;
  76     public static final boolean allowHiDPIScaling;
  77     public static final long maxVram;
  78     public static final long targetVram;
  79     public static final boolean poolStats;


 199         if (order != null) {
 200             tryOrderArr = split(order, ",");
 201         } else {
 202             if (PlatformUtil.isWindows()) {
 203                 tryOrderArr = new String[] { "d3d", "sw" };
 204             } else if (PlatformUtil.isMac()) {
 205                 tryOrderArr = new String[] { "es2", "sw" };
 206             } else if (PlatformUtil.isIOS()) {
 207                 tryOrderArr = new String[] { "es2" };
 208             } else if (PlatformUtil.isAndroid()) {
 209                     tryOrderArr = new String[] { "es2" };
 210             } else if (PlatformUtil.isLinux()) {
 211                 tryOrderArr = new String[] { "es2", "sw" };
 212             } else {
 213                 tryOrderArr = new String[] { "sw" };
 214             }
 215         }
 216 
 217         tryOrder = Collections.unmodifiableList(Arrays.asList(tryOrderArr));
 218 
 219         useMarlinRasterizer   = getBoolean(systemProperties, "prism.marlinrasterizer", false);
 220         useMarlinRasterizerDP = getBoolean(systemProperties, "prism.marlin.double", false);
 221         if (useMarlinRasterizer) {
 222             doNativePisces = false;
 223         } else {
 224             String npprop = systemProperties.getProperty("prism.nativepisces");
 225             if (npprop == null) {
 226                 doNativePisces = PlatformUtil.isEmbedded() || !PlatformUtil.isLinux();
 227             } else {
 228                 doNativePisces = Boolean.parseBoolean(npprop);
 229             }
 230         }
 231 
 232         String primtex = systemProperties.getProperty("prism.primtextures");
 233         if (primtex == null) {
 234             primTextureSize = PlatformUtil.isEmbedded() ? -1 : 0;
 235         } else if (primtex.equals("true")) {
 236             primTextureSize = -1;
 237         } else if (primtex.equals("false")) {
 238             primTextureSize = 0;
 239         } else {
 240             primTextureSize =


 247 
 248         forcePow2 = getBoolean(systemProperties, "prism.forcepowerof2", false);
 249         noClampToZero = getBoolean(systemProperties, "prism.noclamptozero", false);
 250 
 251         allowHiDPIScaling = getBoolean(systemProperties, "prism.allowhidpi", true);
 252 
 253         maxVram = getLong(systemProperties, "prism.maxvram", 512 * 1024 * 1024,
 254                           "Try -Dprism.maxvram=<long>[kKmMgG]");
 255         targetVram = getLong(systemProperties, "prism.targetvram", maxVram / 8, maxVram,
 256                              "Try -Dprism.targetvram=<long>[kKmMgG]|<double(0,100)>%");
 257         poolStats = getBoolean(systemProperties, "prism.poolstats", false);
 258         poolDebug = getBoolean(systemProperties, "prism.pooldebug", false);
 259 
 260         if (verbose) {
 261             System.out.print("Prism pipeline init order: ");
 262             for (String s : tryOrder) {
 263                 System.out.print(s+" ");
 264             }
 265             System.out.println("");
 266             if (useMarlinRasterizer) {
 267                 String prectype = (useMarlinRasterizerDP ? "double" : "float");
 268                 System.out.println("Using Marlin rasterizer (" + prectype +')');
 269             } else {
 270                 String piscestype = (doNativePisces ? "native" : "java");
 271                 System.out.println("Using " + piscestype + "-based Pisces rasterizer");
 272             }
 273             printBooleanOption(dirtyOptsEnabled, "Using dirty region optimizations");
 274             if (primTextureSize == 0) {
 275                 System.out.println("Not using texture mask for primitives");
 276             } else if (primTextureSize < 0) {
 277                 System.out.println("Using system sized mask for primitives");
 278             } else {
 279                 System.out.println("Using "+primTextureSize+" sized mask for primitives");
 280             }
 281             printBooleanOption(forcePow2, "Forcing power of 2 sizes for textures");
 282             printBooleanOption(!noClampToZero, "Using hardware CLAMP_TO_ZERO mode");
 283             printBooleanOption(allowHiDPIScaling, "Opting in for HiDPI pixel scaling");
 284         }
 285 
 286         /*
 287          * Setting for maximum texture size. Default is 4096.
 288          * This will clamp the limit reported by the card to the specified


< prev index next >