Bug 767062 - Lags when zooming or dragging zoomed image (cmsFLAGS_NOOPTIMIZE)

Use cmsFLAGS_NOOPTIMIZE only for actual image buffer or single color
transforms, but not for previews or the image display. Makes things a
lot more responsive again.
This commit is contained in:
Michael Natterer 2016-06-05 16:50:02 +02:00
parent cd147a4a48
commit b4f34375b7
7 changed files with 23 additions and 7 deletions

View file

@ -668,6 +668,7 @@ _gimp_image_update_color_profile (GimpImage *image,
srgb_profile = gimp_color_profile_new_rgb_srgb ();
flags |= GIMP_COLOR_TRANSFORM_FLAGS_NOOPTIMIZE;
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
private->transform_to_srgb_u8 =

View file

@ -683,6 +683,8 @@ gimp_gegl_convert_color_profile (GeglBuffer *src_buffer,
if (bpc)
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
flags |= GIMP_COLOR_TRANSFORM_FLAGS_NOOPTIMIZE;
transform = gimp_color_transform_new (src_profile, src_format,
dest_profile, dest_format,
intent, flags);

View file

@ -250,6 +250,8 @@ gimp_operation_profile_transform_prepare (GeglOperation *operation)
if (self->bpc)
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
flags |= GIMP_COLOR_TRANSFORM_FLAGS_NOOPTIMIZE;
self->transform = gimp_color_transform_new (self->src_profile, format,
self->dest_profile, format,
self->intent, flags);

View file

@ -224,7 +224,7 @@ gimp_color_transform_new (GimpColorProfile *src_profile,
priv->transform = cmsCreateTransform (src_lcms, lcms_src_format,
dest_lcms, lcms_dest_format,
rendering_intent,
flags | cmsFLAGS_NOOPTIMIZE);
flags);
if (lcms_last_error)
{

View file

@ -34,6 +34,7 @@ G_BEGIN_DECLS
typedef enum
{
GIMP_COLOR_TRANSFORM_FLAGS_NOOPTIMIZE = 0x0100,
GIMP_COLOR_TRANSFORM_FLAGS_GAMUT_CHECK = 0x1000,
GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION = 0x2000,
} GimpColorTransformFlags;

View file

@ -771,9 +771,13 @@ gimp_widget_get_color_transform (GtkWidget *widget,
GimpColorTransformFlags flags = 0;
if (config->simulation_use_black_point_compensation)
{
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
}
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
#if 0
/* FIXME add this to GimpColorConfig */
if (config->simulation_nooptimize)
flags |= GIMP_COLOR_TRANSFORM_FLAGS_NOOPTIMIZE;
#endif
if (config->simulation_gamut_check)
{
@ -806,9 +810,13 @@ gimp_widget_get_color_transform (GtkWidget *widget,
GimpColorTransformFlags flags = 0;
if (config->display_use_black_point_compensation)
{
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
}
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
#if 0
/* FIXME add this to GimpColorConfig */
if (config->display_nooptimize)
flags |= GIMP_COLOR_TRANSFORM_FLAGS_NOOPTIMIZE;
#endif
cache->transform =
gimp_color_transform_new (cache->src_profile,

View file

@ -404,6 +404,8 @@ colorsel_cmyk_config_changed (ColorselCmyk *module)
flags |= GIMP_COLOR_TRANSFORM_FLAGS_BLACK_POINT_COMPENSATION;
}
flags |= GIMP_COLOR_TRANSFORM_FLAGS_NOOPTIMIZE;
module->rgb2cmyk = gimp_color_transform_new (rgb_profile,
babl_format ("R'G'B' double"),
cmyk_profile,