changeset 4954:57a0f2653086

RT-32698: Dirty region count is higher than it used to be by default Reviewed By: Felipe
author rbair
date Tue, 03 Sep 2013 16:18:42 -0700
parents 55316c1ad394
children fc56181afdd6
files modules/graphics/src/main/java/com/sun/prism/impl/PrismSettings.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/prism/impl/PrismSettings.java	Tue Sep 03 15:38:51 2013 -0700
+++ b/modules/graphics/src/main/java/com/sun/prism/impl/PrismSettings.java	Tue Sep 03 16:18:42 2013 -0700
@@ -33,6 +33,7 @@
 import java.util.Properties;
 import java.util.StringTokenizer;
 import com.sun.javafx.PlatformUtil;
+import com.sun.javafx.Utils;
 
 /**
  * Contains the runtime arguments used by Prism.
@@ -122,8 +123,7 @@
 
         // The maximum number of dirty regions to use. The absolute max that we can
         // support at present is 15.
-        dirtyRegionCount = Math.max(getInt(systemProperties, "prism.dirtyregioncount",
-                                  6, null), 15);
+        dirtyRegionCount = Utils.clamp(0, getInt(systemProperties, "prism.dirtyregioncount", 6, null), 15);
 
         /* Dirty region optimizations */
         threadCheck = getBoolean(systemProperties, "prism.threadcheck", false);