Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 16264 Details for
Bug 79894
Control.update() method is too expensive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Control patch
flush.diff (text/plain), 3.71 KB, created by
Artyom Kuanbekov
on 2004-12-01 12:11:50 EST
(
hide
)
Description:
Control patch
Filename:
MIME Type:
Creator:
Artyom Kuanbekov
Created:
2004-12-01 12:11:50 EST
Size:
3.71 KB
patch
obsolete
>diff -NaurbB cvs_swt/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java new_flush/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java >--- cvs_swt/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 2004-11-09 14:58:19.000000000 +0300 >+++ new_flush/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java 2004-12-01 17:07:09.000000000 +0300 >@@ -49,6 +49,12 @@ > Object layoutData; > Accessible accessible; > >+ private static final XExposeEvent exposeEvent = new XExposeEvent (); >+ private static final XVisibilityEvent visibilityEvent = new XVisibilityEvent (); >+ private static final GdkRectangle flushRect = new GdkRectangle(); >+ private static final int /*long*/ [] flushData = new int /*long*/ [1]; >+ >+ > Control () { > } > >@@ -3195,13 +3201,66 @@ > } > > void update (boolean all) { >-// checkWidget(); >- if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_REALIZED) == 0) return; >+ /*Paint window will always return window of realized widget */ > int /*long*/ window = paintWindow (); >- display.flushExposes (window, all); >+ if (window != 0) >+ { >+ OS.gdk_flush (); >+ if (OS.GDK_WINDOWING_X11 ()) { >+ int /*long*/ xEvent = OS.g_malloc (XEvent.sizeof); >+ flushExposes(window, all, xEvent, this); >+ OS.g_free(xEvent); >+ } > OS.gdk_window_process_updates (window, all); >+ } > } > >+private void flushExposes( int /*long*/ window, boolean all, >+ int /*long*/ xEvent, Control control) { >+ int /*long*/ xDisplay = OS1.GDK_WINDOW_XDISPLAY(window); >+ int /*long*/ xWindow = OS1.GDK_WINDOW_XID(window); >+ >+ while( OS.XCheckWindowEvent( xDisplay, xWindow, OS.ExposureMask, xEvent)) { >+ OS.memmove (exposeEvent, xEvent, XExposeEvent.sizeof); >+ flushRect.x = exposeEvent.x; >+ flushRect.y = exposeEvent.y; >+ flushRect.width = exposeEvent.width; >+ flushRect.height = exposeEvent.height; >+ OS.gdk_window_invalidate_rect (window, flushRect, true); >+ } >+ >+ if(control != null){ >+ while( OS.XCheckWindowEvent( xDisplay, xWindow, OS.VisibilityChangeMask, xEvent)) { >+ OS.memmove (visibilityEvent, xEvent, XVisibilityEvent.sizeof); >+ if (visibilityEvent.state == OS.VisibilityFullyObscured) >+ control.state |= Widget.OBSCURED; >+ else >+ control.state &= ~Widget.OBSCURED; >+ } >+ } >+ >+ if(all) { >+ int /*long*/ children = OS1.gdk_window_peek_children(window); >+ while (children != 0) { >+ int /*long*/ child = OS.g_list_data (children); >+ if(child != 0) { >+ OS.gdk_window_get_user_data (child, flushData); >+ int /*long*/ handle = flushData [0]; >+ Widget widget = handle != 0 ? display.getWidget (handle) : null; >+ if (widget != null && widget instanceof Control) { >+ control = (Control) widget; >+ control = child == control.paintWindow () ? control: null; >+ } >+ else >+ control = null; >+ flushExposes(child, all, xEvent, control); >+ } >+ children = OS.g_list_next (children); >+ } >+ } >+} >+ >+ > void updateLayout (boolean all) { > /* Do nothing */ > } >diff -NaurbB cvs_swt/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS1.java new_flush/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS1.java >--- cvs_swt/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS1.java 1970-01-01 03:00:00.000000000 +0300 >+++ new_flush/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS1.java 2004-12-01 11:46:38.000000000 +0300 >@@ -0,0 +1,11 @@ >+package org.eclipse.swt.internal.gtk; >+ >+public final class OS1 { >+ static { >+ System.loadLibrary("swt-pi1"); >+ } >+ >+ public static synchronized native int /*long*/ gdk_window_peek_children(int /*long*/ window); >+ public static synchronized native int /*long*/ GDK_WINDOW_XDISPLAY(int /*long*/ window); >+ public static synchronized native int /*long*/ GDK_WINDOW_XID(int /*long*/ window); >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 79894
:
16264
|
16265
|
16319
|
16856
|
16857
|
20220