--- old/src/share/classes/sun/swing/LightweightContent.java 2014-05-21 19:27:17.000000000 +0400 +++ new/src/share/classes/sun/swing/LightweightContent.java 2014-05-21 19:27:17.000000000 +0400 @@ -105,11 +105,30 @@ * @param width the width of the image * @param height the height of the image * @param linestride the line stride of the pixel buffer + * @param scale the scale factor of the pixel buffer */ - public void imageBufferReset(int[] data, + default public void imageBufferReset(int[] data, int x, int y, int width, int height, - int linestride); + int linestride, + int scale) + { + imageBufferReset(data, x, y, width, height, linestride); + } + + /** + * The default implementation for #imageBufferReset uses a hard-coded value + * of 1 for the scale factor. Both the old and the new methods provide + * default implementations in order to allow a client application to run + * with any JDK version without breaking backward compatibility. + */ + default public void imageBufferReset(int[] data, + int x, int y, + int width, int height, + int linestride) + { + imageBufferReset(data, x, y, width, height, linestride, 1); + } /** * {@code JLightweightFrame} calls this method to notify the client