Re: [AD] SF.net SVN: alleg:[13312] allegro/branches/4.9

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On April 24, 2010, Peter Wang wrote:
> On 25 April 2010 05:49, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > On April 24, 2010, tjaden@xxxxxxxxxx wrote:
> >> Revision: 13312
> >>           http://alleg.svn.sourceforge.net/alleg/?rev=13312&view=rev
> >> Author:   tjaden
> >> Date:     2010-04-24 14:28:41 +0000 (Sat, 24 Apr 2010)
> >> 
> >> Log Message:
> >> -----------
> >> Init xinerama/randr/xf86vm interfaces lazily.
> > 
> > I'm not entirely sure this is a good idea. Especially once xrandr
> > events are supported, xrandr will need to be inited on startup.
> 
> Ok, we'll see.
> 
> >> Getting the information from randr can cause flickers and background
> >> sound to stutter, so delay doing so until actually necessary.
> > 
> > So why not do it at the beginning?
> 
> Because every time I start an Allegro program those things happen,
> whether or not the program cares about multi-monitor information or
> changing the screen resolution.

Woha, wait, it makes ALL audio stutter? Something is rotten in the state of 
denmark :o

I'm not sure I can see how xrandr info fetching can cause any serious cpu 
use, and even then audio just shouldn't stutter these days (least I find it 
hard to get audio to stutter even when both my cores are pegged, amarok and 
X/KDE can be locked up solid, but the audio will still play).

I suspect something about your gfx drivers, or version of Xorg. Though I'm 
not sure how we can work around that properly. Or if we /can/. As I 
mentioned, xrandr will probably need to be inited at startup once we support 
listening for xrandr change events (so we can send events when things like a 
switch out happens, etc). If something changes the mode behind allegro's 
back, it'd be nice to handle it gracefully once allegro is switched back 
into (change the mode back). Also handle monitor hot plug a little better. 
Right now it won't notice if a display is removed at all. Though it will 
notice if one is plugged in, if you call the get num monitors thing, but you 
won't get any event about it yet.

> >> +static void init_mmon_interface(ALLEGRO_SYSTEM_XGLX *s)
> >> +{
> >> +   if (s->mmon_interface_inited)
> >> +      return;
> >> +
> >> +   /* Shouldn't we avoid initing any more of these than we need? */
> >> +
> > 
> > You could probably avoid initing xf86vm if you really want to. But
> > Xinerama is tightly intertwined with both the xf86vm and XRandR code.
> 
> Ok.
> 
> Peter
> 
> -------------------------------------------------------------------------
> -----


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/