< prev index next >

src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c

Print this page

        

*** 322,333 **** fp_g_strfreev = dl_symbol("g_strfreev"); /* GDK */ fp_gdk_get_default_root_window = dl_symbol("gdk_get_default_root_window"); - fp_gdk_window_get_scale_factor = - dl_symbol("gdk_window_get_scale_factor"); /* Pixbuf */ fp_gdk_pixbuf_new = dl_symbol("gdk_pixbuf_new"); fp_gdk_pixbuf_new_from_file = dl_symbol("gdk_pixbuf_new_from_file"); --- 322,331 ----
*** 2888,2901 **** jint scale) { GdkPixbuf *pixbuf; jint *ary; GdkWindow *root = (*fp_gdk_get_default_root_window)(); ! int win_scale = (*fp_gdk_window_get_scale_factor)(root); ! pixbuf = (*fp_gdk_pixbuf_get_from_drawable)( ! root, x, y, (int)(width / (float)win_scale + 0.5), (int)(height / (float)win_scale + 0.5)); ! if (pixbuf && scale != 1) { GdkPixbuf *scaledPixbuf; x /= scale; y /= scale; width /= scale; --- 2886,2896 ---- jint scale) { GdkPixbuf *pixbuf; jint *ary; GdkWindow *root = (*fp_gdk_get_default_root_window)(); ! pixbuf = (*fp_gdk_pixbuf_get_from_drawable)(root, x, y, width, height); if (pixbuf && scale != 1) { GdkPixbuf *scaledPixbuf; x /= scale; y /= scale; width /= scale;
*** 2909,2920 **** } if (pixbuf) { int nchan = (*fp_gdk_pixbuf_get_n_channels)(pixbuf); int stride = (*fp_gdk_pixbuf_get_rowstride)(pixbuf); ! if ((*fp_gdk_pixbuf_get_width)(pixbuf) >= width ! && (*fp_gdk_pixbuf_get_height)(pixbuf) >= height && (*fp_gdk_pixbuf_get_bits_per_sample)(pixbuf) == 8 && (*fp_gdk_pixbuf_get_colorspace)(pixbuf) == GDK_COLORSPACE_RGB && nchan >= 3 ) { guchar *p, *pix = (*fp_gdk_pixbuf_get_pixels)(pixbuf); --- 2904,2915 ---- } if (pixbuf) { int nchan = (*fp_gdk_pixbuf_get_n_channels)(pixbuf); int stride = (*fp_gdk_pixbuf_get_rowstride)(pixbuf); ! if ((*fp_gdk_pixbuf_get_width)(pixbuf) == width ! && (*fp_gdk_pixbuf_get_height)(pixbuf) == height && (*fp_gdk_pixbuf_get_bits_per_sample)(pixbuf) == 8 && (*fp_gdk_pixbuf_get_colorspace)(pixbuf) == GDK_COLORSPACE_RGB && nchan >= 3 ) { guchar *p, *pix = (*fp_gdk_pixbuf_get_pixels)(pixbuf);
< prev index next >