[GtkGLExt] Creating a new widget type vs. modifying an instance of an existing type



My initial approach to using GtkGLExt in my Mozilla plug-in involved
creating a new widget type inheriting GtkDrawingArea and giving it GL
capabilities in the widget's _init function. There are user input events
I need to respond to (e.g., button-press-event), and I set functions for
these events for the widget class.

For various reasons I thought it better to change this approach to one
where I simply use GtkDrawingArea directly and add GL capabilities and
event callbacks to it when I construct it. This involved little more
than moving some code around; and I had assumed that the user-visibible
effect of this change would be nil. However, this appears to have had a
significant impact on performance. Now when pressing a mouse button over
the widget there is a significant delay before the widget response,
where before it was virtually instantaneous. I'm also observing some
crashes since making this change that suggest the event callbacks are
now occurring on a different thread from before--surprising, but perhaps
only because I don't know GTK well enough.

Can anyone offer any insight into this?

-- 
Braden McDaniel                           e-mail: <braden endoframe com>
<http://endoframe.com>                    Jabber: <braden jabber org>




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