Commit b4f34375 authored by Michael Natterer's avatar Michael Natterer 😴

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.
parent cd147a4a
......@@ -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 =
......
......@@ -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);
......
......@@ -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);
......
......@@ -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)
{
......
......@@ -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;
......
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment