[Top][All Lists]

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

Re: [Gnash-commit] [SCM] Gnash branch, fast, created. release_0_8_9_fina

From: Sandro Santilli
Subject: Re: [Gnash-commit] [SCM] Gnash branch, fast, created. release_0_8_9_final-230-gec49d01
Date: Sun, 10 Apr 2011 09:23:32 +0200

On Sun, Apr 10, 2011 at 08:10:15AM +0200, Benjamin Wolsey wrote:
> >  void
> > -DisplayList::mergeDisplayList(DisplayList& newList)
> > +DisplayList::mergeDisplayList(DisplayList& newList, DisplayObject& o)
> What's the reason for not returning a bool and letting the caller handle
> it? I realise it would make the mergeDisplayList code a little bit
> uglier, but it doesn't seem to me like DisplayList has any business
> invalidating a DisplayObject that someone might choose to pass.

The set_invalidated call must happen _before_ the DisplayList of a
DisplayObject is changed. In order to decouple we might:

 1) Change to mergeDIsplayList(DisplayList& to, DisplayList& from)
    and use a temporary DisplayList as 'to', then use the bool
    return and set_invalidated _before_ resetting our displayList
    with 'to'.

 2) Pass a functor to ::MergeDisplayList to be invoked _before_
    the DisplayList is changed.

I did (2) w/out taking the time to define an additional indirection.
If you feel like improving you're welcome, but I wuldn't making it
too complex. 


  ()   Free GIS & Flash consultant/developer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]