Brush performance fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I recently ran some gprof profiles on 1.1.9 using the default fuzzy
brush. I found that 4-8% of the time in basic painting was being spent
in:

    plug_in_set_menu_sensitivity()

This is called from:

    gdisplay_flush_whenever()

yosh suggested this fix which eliminates this unnecessary overhead:

--- gdisplay.c  1999/09/23 11:49:15     1.102
+++ gdisplay.c  1999/09/27 21:28:22
@@ -684,7 +684,7 @@
   qmask_buttons_update (gdisp);
 
   /*  ensure the consistency of the tear-off menus  */
-  if (gimp_context_get_display (gimp_context_get_user ()) == gdisp)
+  if (!now && gimp_context_get_display (gimp_context_get_user ()) ==
gdisp)
     gdisplay_set_menu_sensitivity (gdisp);
 }

Is it OK to shut off this flush during painting to boost performance.

-- Ed Millard


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux