[gimp] Bug 767062 - Lags when zooming or dragging zoomed image (cmsFLAGS_NOOPTIMIZE)
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 767062 - Lags when zooming or dragging zoomed image (cmsFLAGS_NOOPTIMIZE)
- Date: Sun, 5 Jun 2016 14:52:09 +0000 (UTC)
commit b4f34375b7cc898f2cc1ee7b6c3e93b2830706c8
Author: Michael Natterer <mitch gimp org>
Date: Sun Jun 5 16:50:02 2016 +0200
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.
app/core/gimpimage-color-profile.c | 1 +
app/gegl/gimp-gegl-loops.c | 2 ++
app/operations/gimpoperationprofiletransform.c | 2 ++
libgimpcolor/gimpcolortransform.c | 2 +-
libgimpcolor/gimpcolortransform.h | 1 +
libgimpwidgets/gimpwidgetsutils.c | 20 ++++++++++++++------
modules/color-selector-cmyk.c | 2 ++
7 files changed, 23 insertions(+), 7 deletions(-)
---
diff --git a/app/core/gimpimage-color-profile.c b/app/core/gimpimage-color-profile.c
index 50e90d6..39daa4f 100644
--- a/app/core/gimpimage-color-profile.c
+++ b/app/core/gimpimage-color-profile.c
@@ -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 =
diff --git a/app/gegl/gimp-gegl-loops.c b/app/gegl/gimp-gegl-loops.c
index 2110bc4..87aad49 100644
--- a/app/gegl/gimp-gegl-loops.c
+++ b/app/gegl/gimp-gegl-loops.c
@@ -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);
diff --git a/app/operations/gimpoperationprofiletransform.c b/app/operations/gimpoperationprofiletransform.c
index 5445f3b..d22b9b5 100644
--- a/app/operations/gimpoperationprofiletransform.c
+++ b/app/operations/gimpoperationprofiletransform.c
@@ -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);
diff --git a/libgimpcolor/gimpcolortransform.c b/libgimpcolor/gimpcolortransform.c
index 143b3f2..05329b8 100644
--- a/libgimpcolor/gimpcolortransform.c
+++ b/libgimpcolor/gimpcolortransform.c
@@ -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)
{
diff --git a/libgimpcolor/gimpcolortransform.h b/libgimpcolor/gimpcolortransform.h
index aaa9d76..067cd39 100644
--- a/libgimpcolor/gimpcolortransform.h
+++ b/libgimpcolor/gimpcolortransform.h
@@ -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;
diff --git a/libgimpwidgets/gimpwidgetsutils.c b/libgimpwidgets/gimpwidgetsutils.c
index f5976bc..1076907 100644
--- a/libgimpwidgets/gimpwidgetsutils.c
+++ b/libgimpwidgets/gimpwidgetsutils.c
@@ -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,
diff --git a/modules/color-selector-cmyk.c b/modules/color-selector-cmyk.c
index c2e8fda..821f404 100644
--- a/modules/color-selector-cmyk.c
+++ b/modules/color-selector-cmyk.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]