On Sunday 03 June 2007 13:12:59 strk wrote:
> On Sun, Jun 03, 2007 at 01:02:27PM -0400, Quinn Storm wrote:
> > On Sunday 03 June 2007 04:10:03 strk wrote:
> > > Ok, last proposal: just call ::display again, so the stage is rendered
> > > again on expose events. The only possible downside I can think of is
> > > expose events showing some intermediate states otherwise not visible
> > > with normal playback (consider an sub-FPS interval transforming
> > > characters), which doesn't seem a big problem to me.
> > >
> > >
> > > --strk;
> >
> > That sounds good, and would have been what I'd have done had I known
> > about ::display properly. I'll look into that, but it sounds like a
> > proper solution at least for the moment.
>
> We discussed in the past about adding a ::redraw method to the Gui class,
> to be also used from a menu item. Can't remember if we did already, if we
> didn't consider adding one yourself (you'd call that on expose).
>
> Also, to avoid redrawing as hell while receiving a long chain of expose
> events it might be worth having a loop checking for it. IIRC Udo added one
> mechanism working at SWF FPS rate (wantsRedraw or similar method) but we
> might want an SWF agnostic one. See also the Movie_Advancement page on
> gnashdev wiki.
>
> Have fun !
>
> --strk;
Here we go, I hooked in using just the want_redraw (with an ugly #ifdef since
the function isn't yet exported to glue), I haven't pushed the change also to
sdl yet, but this patch fixes gtk. If you like it, I'm sure its easy to push
the change to SDL
? .gtk.cpp.swp
? .gtk_glue_gtkglext.cpp.swp
? .gtksup.h.swp
? .gui.cpp.swp
Index: gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.91
diff -u -r1.91 gtk.cpp
--- gtk.cpp 14 May 2007 10:03:38 -0000 1.91
+++ gtk.cpp 3 Jun 2007 21:56:00 -0000
@@ -238,6 +238,16 @@
return true;
}
+bool
+GtkGui::want_redraw()
+{
+#ifdef RENDERER_OPENGL
+ return true;
+#else
+ return false;
+#endif
+}
+
void
GtkGui::renderBuffer()
{
Index: gtksup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gtksup.h,v
retrieving revision 1.42
diff -u -r1.42 gtksup.h
--- gtksup.h 28 May 2007 15:41:00 -0000 1.42
+++ gtksup.h 3 Jun 2007 21:56:00 -0000
@@ -65,6 +65,7 @@
virtual void renderBuffer();
virtual void setInterval(unsigned int interval);
virtual void setTimeout(unsigned int timeout);
+ virtual bool want_redraw();
/// Create a menu bar for the application, attach to our window.
// This should only appear in the standalone player.
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev