On Fri, 11 Feb 2022 08:09:06 GMT, Maxim Kartashev <d...@openjdk.java.net> wrote:
>> src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c line 2876: >> >>> 2874: static gboolean gtk3_get_drawable_data(JNIEnv *env, jintArray >>> pixelArray, >>> 2875: int x, jint y, jint width, jint height, jint jwidth, int dx, int >>> dy, >>> 2876: >>> jint scale) { >> >> Is this scale parameter is simply ignored? If the passed parameters are >> always in the device space and the array is allocated properly then we >> should not care about this scale(especially in case of gtk2)? > >> Is this scale parameter is simply ignored? > > Looks like it. I can only find one call site of `get_drawable_data()` (in > [Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl()](https://github.com/openjdk/jdk/blob/8441d51e71e143250b44eea74114a624cf00cc3e/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c#L336)) > and the `scale` parameter is always 1. I think I can drop it from the > interface if you prefer. Yes please, this "scale" just make the code complicated w/o reason. ------------- PR: https://git.openjdk.java.net/jdk/pull/7425