Bug 681968 - Disabling 'Dot for Dot' glitches display

Enhance the existing but unused display scaling (hidpi/retina) support
to work independently in x and y direction, and adjust the scaling
factors accordingly when dot-for-dot is off and xres != yres.

Increase GIMP_DISPLAY_RENDER_MAX_SCALE from 2.0 to 4.0 and adjust the
rendering chunk size dynamically so we never render chunks that do
not fit into the GimpDisplayXfer buffers.
This commit is contained in:
Michael Natterer
2014-04-20 18:06:52 +02:00
parent 1a674374d3
commit 051a3e4af4
3 changed files with 82 additions and 44 deletions

View File

@ -19,16 +19,10 @@
#define __GIMP_DISPLAY_XFER_H__
/* #define GIMP_DISPLAY_RENDER_ENABLE_SCALING 1 */
#define GIMP_DISPLAY_RENDER_BUF_WIDTH 256
#define GIMP_DISPLAY_RENDER_BUF_HEIGHT 256
#ifdef GIMP_DISPLAY_RENDER_ENABLE_SCALING
#define GIMP_DISPLAY_RENDER_MAX_SCALE 2.0
#else
#define GIMP_DISPLAY_RENDER_MAX_SCALE 1.0
#endif
#define GIMP_DISPLAY_RENDER_MAX_SCALE 4.0
GimpDisplayXfer * gimp_display_xfer_realize (GtkWidget *widget);