-
Bug
-
Resolution: Unresolved
-
P5
-
11, 17, 20
-
None
There are 4 confusing calls to Math.ceil with int argument.
sun.java2d.opengl.GLXSurfaceData.GLXOffScreenSurfaceData#getBounds:
r.width = (int) Math.ceil(r.width * scale);
r.height = (int) Math.ceil(r.height * scale);
sun.java2d.opengl.GLXSurfaceData.GLXWindowSurfaceData#getBounds:
r.width = (int) Math.ceil(r.width * scale);
r.height = (int) Math.ceil(r.height * scale);
r.width, r.height and scale variables have 'int' type. It means Math.ceil is called with 'int' argument too. Math.ceil is useless when called with integer values - it just returns its argument.
Seems like scale was supposed to have 'double' type?
sun.java2d.opengl.GLXSurfaceData.GLXOffScreenSurfaceData#getBounds:
r.width = (int) Math.ceil(r.width * scale);
r.height = (int) Math.ceil(r.height * scale);
sun.java2d.opengl.GLXSurfaceData.GLXWindowSurfaceData#getBounds:
r.width = (int) Math.ceil(r.width * scale);
r.height = (int) Math.ceil(r.height * scale);
r.width, r.height and scale variables have 'int' type. It means Math.ceil is called with 'int' argument too. Math.ceil is useless when called with integer values - it just returns its argument.
Seems like scale was supposed to have 'double' type?
- relates to
-
JDK-8159902 OGL surfaces are not HiDPI compatible on Linux/Solaris
- Resolved