summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java14
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index edd5266b9..6e9e28c19 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -581,14 +581,14 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
@Override
public final void setSurfaceScale(final int[] pixelScale) { // HiDPI support
SurfaceScaleUtils.validateReqPixelScale(reqPixelScale, pixelScale, DEBUG ? getClass().getSimpleName() : null);
- final Backend b = backend;
- if ( isInitialized && null != b ) {
- final int hadPixelScaleX = hasPixelScale[0];
- final int hadPixelScaleY = hasPixelScale[1];
- SurfaceScaleUtils.computePixelScale(hasPixelScale, hasPixelScale, reqPixelScale, nativePixelScale, DEBUG ? getClass().getSimpleName() : null);
- if( hadPixelScaleX != hasPixelScale[0] || hadPixelScaleY != hasPixelScale[1] ) {
+ final int hadPixelScaleX = hasPixelScale[0];
+ final int hadPixelScaleY = hasPixelScale[1];
+ SurfaceScaleUtils.computePixelScale(hasPixelScale, hasPixelScale, reqPixelScale, nativePixelScale, DEBUG ? getClass().getSimpleName() : null);
+ if( hadPixelScaleX != hasPixelScale[0] || hadPixelScaleY != hasPixelScale[1] ) {
+ reshapeImpl(getWidth(), getHeight());
+ final Backend b = backend;
+ if ( isInitialized && null != b ) {
updateWrappedSurfaceScale(b.getDrawable());
- reshapeImpl(getWidth(), getHeight());
display();
}
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java
index 601e6dd71..fe1fa3b9d 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java
@@ -105,7 +105,7 @@ public class SurfaceSize implements Comparable<SurfaceSize> {
@Override
public final int hashCode() {
// 31 * x == (x << 5) - x
- int hash = 31 + getResolution().hashCode();
+ int hash = getResolution().hashCode();
hash = ((hash << 5) - hash) + getBitsPerPixel();
return hash;
}