commit some #if 0'ed experimental code.

2008-10-12  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationadditionmode.c: commit some #if 0'ed
	experimental code.

	* app/actions/view-commands.c (view_use_gegl_cmd_callback): use
	gimp_image_update(), simply exposing the shell doesn't reconstruct
	the projection.


svn path=/trunk/; revision=27247
This commit is contained in:
Michael Natterer
2008-10-12 19:01:22 +00:00
committed by Michael Natterer
parent 05ed2b46e2
commit 138781daf9
3 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2008-10-12 Michael Natterer <mitch@gimp.org>
* app/gegl/gimpoperationadditionmode.c: commit some #if 0'ed
experimental code.
* app/actions/view-commands.c (view_use_gegl_cmd_callback): use
gimp_image_update(), simply exposing the shell doesn't reconstruct
the projection.
2008-10-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpprojection.h: add a "use_gegl" boolean member.

View File

@ -691,7 +691,7 @@ view_use_gegl_cmd_callback (GtkAction *action,
GimpImage *image;
GimpDisplay *display;
GimpDisplayShell *shell;
gboolean active;
gboolean active;
return_if_no_image (image, data);
return_if_no_display (display, data);
@ -700,7 +700,8 @@ view_use_gegl_cmd_callback (GtkAction *action,
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
image->projection->use_gegl = active;
gimp_display_shell_expose_full (shell);
gimp_image_update (image, 0, 0, image->width, image->height);
gimp_image_flush (image);
}

View File

@ -71,10 +71,17 @@ gimp_operation_addition_mode_process (GeglOperation *operation,
while (samples--)
{
if 1
dest[RED_PIX] = src[RED_PIX] + aux[RED_PIX];
dest[GREEN_PIX] = src[GREEN_PIX] + aux[GREEN_PIX];
dest[BLUE_PIX] = src[BLUE_PIX] + aux[BLUE_PIX];
dest[ALPHA_PIX] = src[ALPHA_PIX];
#else
dest[RED_PIX] = src[RED_PIX] * src[ALPHA_PIX] + aux[RED_PIX] * aux[ALPHA_PIX];
dest[GREEN_PIX] = src[GREEN_PIX] * src[ALPHA_PIX] + aux[GREEN_PIX] * aux[ALPHA_PIX];
dest[BLUE_PIX] = src[BLUE_PIX] * src[ALPHA_PIX] + aux[BLUE_PIX] * aux[ALPHA_PIX];
dest[ALPHA_PIX] = src[ALPHA_PIX] + aux[ALPHA_PIX] - src[ALPHA_PIX] * aux[ALPHA_PIX];
#endif
src += 4;
aux += 4;