-
Bug
-
Resolution: Unresolved
-
P5
-
9, 24
-
None
There is a couple methods in 'sun.java2d.opengl.GLXSurfaceData' which call 'Math.ceil' with 'int' argument. Calling Math.ceil with integer argument is useless - it will just return the same passed value.
sun.java2d.opengl.GLXSurfaceData.GLXOffScreenSurfaceData#getBounds:
public Rectangle getBounds() {
if (type == FLIP_BACKBUFFER) {
Rectangle r = peer.getBounds();
r.x = r.y = 0;
r.width = (int) Math.ceil(r.width * scale);
r.height = (int) Math.ceil(r.height * scale);
return r;
} else {
return new Rectangle(width, height);
}
}
sun.java2d.opengl.GLXSurfaceData.GLXWindowSurfaceData#getBounds
public Rectangle getBounds() {
Rectangle r = peer.getBounds();
r.x = r.y = 0;
r.width = (int) Math.ceil(r.width * scale);
r.height = (int) Math.ceil(r.height * scale);
return r;
}
All 4 calls are useless. Seems we should remove it.
sun.java2d.opengl.GLXSurfaceData.GLXOffScreenSurfaceData#getBounds:
public Rectangle getBounds() {
if (type == FLIP_BACKBUFFER) {
Rectangle r = peer.getBounds();
r.x = r.y = 0;
r.width = (int) Math.ceil(r.width * scale);
r.height = (int) Math.ceil(r.height * scale);
return r;
} else {
return new Rectangle(width, height);
}
}
sun.java2d.opengl.GLXSurfaceData.GLXWindowSurfaceData#getBounds
public Rectangle getBounds() {
Rectangle r = peer.getBounds();
r.x = r.y = 0;
r.width = (int) Math.ceil(r.width * scale);
r.height = (int) Math.ceil(r.height * scale);
return r;
}
All 4 calls are useless. Seems we should remove it.
- relates to
-
JDK-8159902 OGL surfaces are not HiDPI compatible on Linux/Solaris
- Resolved