Fixed bug #119423. There was no speed regression with the actual painting,
2003-10-08 Michael Natterer <mitch@gimp.org> Fixed bug #119423. There was no speed regression with the actual painting, just with the display update (which effectively led to faster painting, it just felt slower). * app/display/gimpdisplayshell.c (gimp_display_shell_flush): added "gboolean now" parameter and update the display immediately if it is TRUE. * app/display/gimpdisplay.c (gimp_display_flush_whenever): pass the "now" we got passed to the function above, so calling gimp_display_flush_now() really flushes *now* again.
This commit is contained in:

committed by
Michael Natterer

parent
0fae4f9c10
commit
96e9f052a2
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
|||||||
|
2003-10-08 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
Fixed bug #119423. There was no speed regression with the actual
|
||||||
|
painting, just with the display update (which effectively led to
|
||||||
|
faster painting, it just felt slower).
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell.c (gimp_display_shell_flush): added
|
||||||
|
"gboolean now" parameter and update the display immediately if
|
||||||
|
it is TRUE.
|
||||||
|
|
||||||
|
* app/display/gimpdisplay.c (gimp_display_flush_whenever): pass
|
||||||
|
the "now" we got passed to the function above, so calling
|
||||||
|
gimp_display_flush_now() really flushes *now* again.
|
||||||
|
|
||||||
2003-10-08 Michael Natterer <mitch@gimp.org>
|
2003-10-08 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* tools/pdbgen/pdb/fileops.pdb (file_load_invoker):
|
* tools/pdbgen/pdb/fileops.pdb (file_load_invoker):
|
||||||
|
@ -68,7 +68,7 @@ static void gimp_display_get_property (GObject *object,
|
|||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec);
|
GParamSpec *pspec);
|
||||||
|
|
||||||
static void gimp_display_flush_whenever (GimpDisplay *gdisp,
|
static void gimp_display_flush_whenever (GimpDisplay *gdisp,
|
||||||
gboolean now);
|
gboolean now);
|
||||||
static void gimp_display_idlerender_init (GimpDisplay *gdisp);
|
static void gimp_display_idlerender_init (GimpDisplay *gdisp);
|
||||||
static gboolean gimp_display_idlerender_callback (gpointer data);
|
static gboolean gimp_display_idlerender_callback (gpointer data);
|
||||||
@ -308,7 +308,7 @@ gimp_display_get_by_ID (Gimp *gimp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_reconnect (GimpDisplay *gdisp,
|
gimp_display_reconnect (GimpDisplay *gdisp,
|
||||||
GimpImage *gimage)
|
GimpImage *gimage)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY (gdisp));
|
g_return_if_fail (GIMP_IS_DISPLAY (gdisp));
|
||||||
@ -428,7 +428,7 @@ gimp_display_coords_in_active_drawable (GimpDisplay *gdisp,
|
|||||||
/* private functions */
|
/* private functions */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_display_flush_whenever (GimpDisplay *gdisp,
|
gimp_display_flush_whenever (GimpDisplay *gdisp,
|
||||||
gboolean now)
|
gboolean now)
|
||||||
{
|
{
|
||||||
GimpDisplayShell *shell;
|
GimpDisplayShell *shell;
|
||||||
@ -488,7 +488,7 @@ gimp_display_flush_whenever (GimpDisplay *gdisp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Next the displays... */
|
/* Next the displays... */
|
||||||
gimp_display_shell_flush (shell);
|
gimp_display_shell_flush (shell, now);
|
||||||
|
|
||||||
/* ensure the consistency of the menus */
|
/* ensure the consistency of the menus */
|
||||||
if (! now)
|
if (! now)
|
||||||
@ -512,7 +512,7 @@ gimp_display_idlerender_init (GimpDisplay *gdisp)
|
|||||||
|
|
||||||
/* We need to merge the IdleRender's and the GimpDisplay's update_areas list
|
/* We need to merge the IdleRender's and the GimpDisplay's update_areas list
|
||||||
* to keep track of which of the updates have been flushed and hence need
|
* to keep track of which of the updates have been flushed and hence need
|
||||||
* to be drawn.
|
* to be drawn.
|
||||||
*/
|
*/
|
||||||
for (list = gdisp->update_areas; list; list = g_slist_next (list))
|
for (list = gdisp->update_areas; list; list = g_slist_next (list))
|
||||||
{
|
{
|
||||||
@ -591,7 +591,7 @@ gimp_display_idlerender_callback (gpointer data)
|
|||||||
if (worky + workh > gdisp->idle_render.basey + gdisp->idle_render.height)
|
if (worky + workh > gdisp->idle_render.basey + gdisp->idle_render.height)
|
||||||
{
|
{
|
||||||
workh = gdisp->idle_render.basey + gdisp->idle_render.height - worky;
|
workh = gdisp->idle_render.basey + gdisp->idle_render.height - worky;
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_display_paint_area (gdisp, workx, worky, workw, workh);
|
gimp_display_paint_area (gdisp, workx, worky, workw, workh);
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ static void gimp_display_get_property (GObject *object,
|
|||||||
GValue *value,
|
GValue *value,
|
||||||
GParamSpec *pspec);
|
GParamSpec *pspec);
|
||||||
|
|
||||||
static void gimp_display_flush_whenever (GimpDisplay *gdisp,
|
static void gimp_display_flush_whenever (GimpDisplay *gdisp,
|
||||||
gboolean now);
|
gboolean now);
|
||||||
static void gimp_display_idlerender_init (GimpDisplay *gdisp);
|
static void gimp_display_idlerender_init (GimpDisplay *gdisp);
|
||||||
static gboolean gimp_display_idlerender_callback (gpointer data);
|
static gboolean gimp_display_idlerender_callback (gpointer data);
|
||||||
@ -308,7 +308,7 @@ gimp_display_get_by_ID (Gimp *gimp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_reconnect (GimpDisplay *gdisp,
|
gimp_display_reconnect (GimpDisplay *gdisp,
|
||||||
GimpImage *gimage)
|
GimpImage *gimage)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY (gdisp));
|
g_return_if_fail (GIMP_IS_DISPLAY (gdisp));
|
||||||
@ -428,7 +428,7 @@ gimp_display_coords_in_active_drawable (GimpDisplay *gdisp,
|
|||||||
/* private functions */
|
/* private functions */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_display_flush_whenever (GimpDisplay *gdisp,
|
gimp_display_flush_whenever (GimpDisplay *gdisp,
|
||||||
gboolean now)
|
gboolean now)
|
||||||
{
|
{
|
||||||
GimpDisplayShell *shell;
|
GimpDisplayShell *shell;
|
||||||
@ -488,7 +488,7 @@ gimp_display_flush_whenever (GimpDisplay *gdisp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Next the displays... */
|
/* Next the displays... */
|
||||||
gimp_display_shell_flush (shell);
|
gimp_display_shell_flush (shell, now);
|
||||||
|
|
||||||
/* ensure the consistency of the menus */
|
/* ensure the consistency of the menus */
|
||||||
if (! now)
|
if (! now)
|
||||||
@ -512,7 +512,7 @@ gimp_display_idlerender_init (GimpDisplay *gdisp)
|
|||||||
|
|
||||||
/* We need to merge the IdleRender's and the GimpDisplay's update_areas list
|
/* We need to merge the IdleRender's and the GimpDisplay's update_areas list
|
||||||
* to keep track of which of the updates have been flushed and hence need
|
* to keep track of which of the updates have been flushed and hence need
|
||||||
* to be drawn.
|
* to be drawn.
|
||||||
*/
|
*/
|
||||||
for (list = gdisp->update_areas; list; list = g_slist_next (list))
|
for (list = gdisp->update_areas; list; list = g_slist_next (list))
|
||||||
{
|
{
|
||||||
@ -591,7 +591,7 @@ gimp_display_idlerender_callback (gpointer data)
|
|||||||
if (worky + workh > gdisp->idle_render.basey + gdisp->idle_render.height)
|
if (worky + workh > gdisp->idle_render.basey + gdisp->idle_render.height)
|
||||||
{
|
{
|
||||||
workh = gdisp->idle_render.basey + gdisp->idle_render.height - worky;
|
workh = gdisp->idle_render.basey + gdisp->idle_render.height - worky;
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_display_paint_area (gdisp, workx, worky, workw, workh);
|
gimp_display_paint_area (gdisp, workx, worky, workw, workh);
|
||||||
|
|
||||||
|
@ -1174,11 +1174,15 @@ gimp_display_shell_expose_full (GimpDisplayShell *shell)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_shell_flush (GimpDisplayShell *shell)
|
gimp_display_shell_flush (GimpDisplayShell *shell,
|
||||||
|
gboolean now)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
gimp_display_shell_update_title (shell);
|
gimp_display_shell_update_title (shell);
|
||||||
|
|
||||||
|
if (now)
|
||||||
|
gdk_window_process_updates (shell->canvas->window, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -226,7 +226,8 @@ void gimp_display_shell_expose_guide (GimpDisplayShell *shell,
|
|||||||
GimpGuide *guide);
|
GimpGuide *guide);
|
||||||
void gimp_display_shell_expose_full (GimpDisplayShell *shell);
|
void gimp_display_shell_expose_full (GimpDisplayShell *shell);
|
||||||
|
|
||||||
void gimp_display_shell_flush (GimpDisplayShell *shell);
|
void gimp_display_shell_flush (GimpDisplayShell *shell,
|
||||||
|
gboolean now);
|
||||||
|
|
||||||
void gimp_display_shell_pause (GimpDisplayShell *shell);
|
void gimp_display_shell_pause (GimpDisplayShell *shell);
|
||||||
void gimp_display_shell_resume (GimpDisplayShell *shell);
|
void gimp_display_shell_resume (GimpDisplayShell *shell);
|
||||||
|
@ -1174,11 +1174,15 @@ gimp_display_shell_expose_full (GimpDisplayShell *shell)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_display_shell_flush (GimpDisplayShell *shell)
|
gimp_display_shell_flush (GimpDisplayShell *shell,
|
||||||
|
gboolean now)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||||
|
|
||||||
gimp_display_shell_update_title (shell);
|
gimp_display_shell_update_title (shell);
|
||||||
|
|
||||||
|
if (now)
|
||||||
|
gdk_window_process_updates (shell->canvas->window, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -226,7 +226,8 @@ void gimp_display_shell_expose_guide (GimpDisplayShell *shell,
|
|||||||
GimpGuide *guide);
|
GimpGuide *guide);
|
||||||
void gimp_display_shell_expose_full (GimpDisplayShell *shell);
|
void gimp_display_shell_expose_full (GimpDisplayShell *shell);
|
||||||
|
|
||||||
void gimp_display_shell_flush (GimpDisplayShell *shell);
|
void gimp_display_shell_flush (GimpDisplayShell *shell,
|
||||||
|
gboolean now);
|
||||||
|
|
||||||
void gimp_display_shell_pause (GimpDisplayShell *shell);
|
void gimp_display_shell_pause (GimpDisplayShell *shell);
|
||||||
void gimp_display_shell_resume (GimpDisplayShell *shell);
|
void gimp_display_shell_resume (GimpDisplayShell *shell);
|
||||||
|
Reference in New Issue
Block a user