--- old/src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java 2013-05-13 18:46:59.935308100 +0400 +++ new/src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java 2013-05-13 18:46:59.757297900 +0400 @@ -515,29 +515,37 @@ @Override public int getMaxTextureWidth() { - int width; - - synchronized (totalDisplayBounds) { - if (totalDisplayBounds.width == 0) { - updateTotalDisplayBounds(); - } - width = totalDisplayBounds.width; - } - - return Math.min(width, getMaxTextureSize()); + //Temporary disable this logic and use some magic constrain. + /* + int width; + + synchronized (totalDisplayBounds) { + if (totalDisplayBounds.width == 0) { + updateTotalDisplayBounds(); + } + width = totalDisplayBounds.width; + } + + return Math.min(width, getMaxTextureSize()); + */ + return getMaxTextureSize() / (getDevice().getScaleFactor() * 2); } @Override public int getMaxTextureHeight() { - int height; - - synchronized (totalDisplayBounds) { - if (totalDisplayBounds.height == 0) { - updateTotalDisplayBounds(); - } - height = totalDisplayBounds.height; - } - - return Math.min(height, getMaxTextureSize()); + //Temporary disable this logic and use some magic constrain. + /* + int height; + + synchronized (totalDisplayBounds) { + if (totalDisplayBounds.height == 0) { + updateTotalDisplayBounds(); + } + height = totalDisplayBounds.height; + } + + return Math.min(height, getMaxTextureSize()); + */ + return getMaxTextureSize() / (getDevice().getScaleFactor() * 2); } }