Commit e624645c authored by Adam D. Moss's avatar Adam D. Moss
Browse files

Another speedup for some types of shaped animation.


	* plug-ins/animationplay/animationplay.c: Another
	speedup for some types of shaped animation.
parent f0426ac2
Sun Jul 19 20:55:36 BST 1998 Adam D. Moss <adam@gimp.org>
* plug-ins/animationplay/animationplay.c: Another
speedup for some types of shaped animation.
Sun Jul 19 10:23:58 PDT 1998 Jay Cox <jaycox@earthlink.net>
* app/paint_funcs.c
new and improved color_pixels now 4-7 times as fast and 8-12
times as convoluted as original color_pixels.
......
/*
* Animation Playback plug-in version 0.98.0
* Animation Playback plug-in version 0.98.2
*
* Adam D. Moss : 1997-98 : adam@gimp.org : adam@foxbox.org
*
......@@ -11,6 +11,9 @@
/*
* REVISION HISTORY:
*
* 98.07.19 : version 0.98.2
* Another speedup for some kinds of shaped animations.
*
* 98.07.19 : version 0.98.0
* Adapted to use GDKRGB (from recent GTK >= 1.1) if
* available - good speed and reliability improvement.
......@@ -333,12 +336,23 @@ static void
reshape_from_bitmap(gchar* bitmap)
{
GdkBitmap *shape_mask;
static gchar *prev_bitmap = NULL;
if ((!prev_bitmap) ||
(memcmp(prev_bitmap, bitmap, (width*height)/8 +height)))
{
shape_mask = gdk_bitmap_create_from_data(shape_window->window,
bitmap,
width, height);
gtk_widget_shape_combine_mask (shape_window, shape_mask, 0, 0);
gdk_bitmap_unref (shape_mask);
shape_mask = gdk_bitmap_create_from_data(shape_window->window,
bitmap,
width, height);
gtk_widget_shape_combine_mask (shape_window, shape_mask, 0, 0);
gdk_bitmap_unref (shape_mask);
if (!prev_bitmap)
{
prev_bitmap = g_malloc ((width*height)/8 +height);
}
memcpy (prev_bitmap, bitmap, (width*height)/8 +height);
}
}
......
/*
* Animation Playback plug-in version 0.98.0
* Animation Playback plug-in version 0.98.2
*
* Adam D. Moss : 1997-98 : adam@gimp.org : adam@foxbox.org
*
......@@ -11,6 +11,9 @@
/*
* REVISION HISTORY:
*
* 98.07.19 : version 0.98.2
* Another speedup for some kinds of shaped animations.
*
* 98.07.19 : version 0.98.0
* Adapted to use GDKRGB (from recent GTK >= 1.1) if
* available - good speed and reliability improvement.
......@@ -333,12 +336,23 @@ static void
reshape_from_bitmap(gchar* bitmap)
{
GdkBitmap *shape_mask;
static gchar *prev_bitmap = NULL;
if ((!prev_bitmap) ||
(memcmp(prev_bitmap, bitmap, (width*height)/8 +height)))
{
shape_mask = gdk_bitmap_create_from_data(shape_window->window,
bitmap,
width, height);
gtk_widget_shape_combine_mask (shape_window, shape_mask, 0, 0);
gdk_bitmap_unref (shape_mask);
shape_mask = gdk_bitmap_create_from_data(shape_window->window,
bitmap,
width, height);
gtk_widget_shape_combine_mask (shape_window, shape_mask, 0, 0);
gdk_bitmap_unref (shape_mask);
if (!prev_bitmap)
{
prev_bitmap = g_malloc ((width*height)/8 +height);
}
memcpy (prev_bitmap, bitmap, (width*height)/8 +height);
}
}
......
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