[gimp] Revert "app: Make drawable updates happen at fixed framerate"
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Revert "app: Make drawable updates happen at fixed framerate"
- Date: Sun, 18 Apr 2010 13:04:19 +0000 (UTC)
commit 5c3cf190958b250d32e940a0eca02a167661d0d9
Author: Michael Natterer <mitch gimp org>
Date: Sun Apr 18 15:03:16 2010 +0200
Revert "app: Make drawable updates happen at fixed framerate"
This reverts commit 32aca3c8b68c77d69ef3b8f5facb42d235491638.
Clearly needs more review, thinking and discussion.
app/core/gimpdrawable.c | 55 +---------------------------------------------
app/core/gimpdrawable.h | 9 -------
2 files changed, 2 insertions(+), 62 deletions(-)
---
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index 9222036..887769c 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -18,7 +18,6 @@
#include "config.h"
#include <gegl.h>
-
#include <gegl-plugin.h>
#include "libgimpbase/gimpbase.h"
@@ -126,8 +125,6 @@ static void gimp_drawable_real_update (GimpDrawable *drawable,
gint width,
gint height);
-static gboolean gimp_drawable_update_timeout (GimpDrawable *drawable);
-
static gint64 gimp_drawable_real_estimate_memsize (const GimpDrawable *drawable,
gint width,
gint height);
@@ -259,14 +256,6 @@ gimp_drawable_init (GimpDrawable *drawable)
drawable->bytes = 0;
drawable->type = -1;
drawable->has_alpha = FALSE;
-
- drawable->dirty_x1 = 0;
- drawable->dirty_y1 = 0;
- drawable->dirty_x2 = 0;
- drawable->dirty_y2 = 0;
-
- drawable->update_count = 0;
- drawable->update_timeout = 0;
}
/* sorry for the evil casts */
@@ -1208,36 +1197,8 @@ gimp_drawable_update (GimpDrawable *drawable,
{
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
- if (drawable->update_timeout > 0)
- {
-
- drawable->dirty_x1 = MIN (x, drawable->dirty_x1);
- drawable->dirty_y1 = MIN (y, drawable->dirty_y1);
-
- drawable->dirty_x2 = MAX (x + width, drawable->dirty_x2);
-
- drawable->dirty_y2 = MAX (y + height, drawable->dirty_y2);
-
- drawable->update_count = drawable->update_count + 1;
- }
- else
- {
- g_signal_emit (drawable, gimp_drawable_signals[UPDATE], 0,
- x, y, width, height);
-
- drawable->dirty_x1 = drawable->dirty_x2;
- drawable->dirty_y1 = drawable->dirty_y2;
- drawable->dirty_x2 = 0;
- drawable->dirty_y2 = 0;
-
- drawable->update_count = 0;
-
- drawable->update_timeout =
- g_timeout_add_full (G_PRIORITY_HIGH,
- 40,
- (GSourceFunc) gimp_drawable_update_timeout,
- drawable, NULL);
- }
+ g_signal_emit (drawable, gimp_drawable_signals[UPDATE], 0,
+ x, y, width, height);
}
void
@@ -2035,15 +1996,3 @@ gimp_drawable_detach_floating_sel (GimpDrawable *drawable,
gimp_image_set_floating_selection (image, NULL);
}
-
-static gboolean
-gimp_drawable_update_timeout (GimpDrawable *drawable)
-{
- drawable->update_timeout = 0;
-
- if (drawable->update_count > 0)
- gimp_drawable_update(drawable,
- drawable->dirty_x1, drawable->dirty_y1,
- drawable->dirty_x2 - drawable->dirty_x1, drawable->dirty_y2 - drawable->dirty_y1);
- return FALSE;
-}
diff --git a/app/core/gimpdrawable.h b/app/core/gimpdrawable.h
index 00c6dfa..caeed82 100644
--- a/app/core/gimpdrawable.h
+++ b/app/core/gimpdrawable.h
@@ -41,15 +41,6 @@ struct _GimpDrawable
GimpImageType type; /* type of drawable */
gboolean has_alpha; /* drawable has alpha */
- gint dirty_x1;
- gint dirty_y1;
- gint dirty_x2;
- gint dirty_y2;
-
- guint update_timeout; /* update delay timeout ID */
-
- guint update_count;
-
GimpDrawablePrivate *private;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]