[BUG]Picking up morphs with the hand.
Daniel Vainsencher
danielv at netvision.net.il
Thu Aug 7 22:30:55 UTC 2003
Any idea why the damage recorder isn't being used? that does some
merging.
putting in
(worldDamageRects, handDamageRects) do: [:e | damageRecorder
recordInvalidRect: e].
allDamage _ damageRecorder invalidRectsFullBounds: Rectangle new.
damageRecorder reset.
gives me back 20%, on
TimeProfileBrowser onBlock: [5 timesRepeat: [ActiveHand grabMorph: s .
World doOneCycle. ActiveHand dropMorphs. World doOneCycle.]]
20% isn't much, though.
Daniel
Karl Ramberg <karl.ramberg at chello.se> wrote:
>
>
> Karl Ramberg wrote:
> >
> > Ned Konz wrote:
> > >
> > > On Thursday 24 July 2003 08:29 am, Karl Ramberg wrote:
> > > > > However... the two rectangles don't seem to be merging.
> > > >
> > > > Seems like you are right, and a fix would be nice :-)
> > >
> > > What do they say?
> > >
> > > "patches welcome"...
> > >
> > I did some timing :
> >
> > [ActiveHand grabMorph: preferences3815 . World doOneCycle] timeToRun 880
> > Here the morph is drawn two times. Double drawing also happens on
> > dropping morphs!
> >
> > [preferences3815 changed. World doOneCycle] timeToRun 539
> > Morph drawn once.
> >
> > [ActiveHand grabMorph: preferences3815 . ] timeToRun 2
> > No drawing.
> >
> > The double drawing of the grabbed morph is a big performance hit on my
> > system !
>
> Ok I found the reason for the double drawing in WorldState displayWorld:submorphs:
> Two collections of damage are created and added together:
>
> allDamage _ worldDamageRects, handDamageRects.
>
> When a morph is grabbed or dropped it will be two allmost identical
> entries in the allDamage
> collection, one from the hand and one from the world.
>
> So what is best way to merge the double entries ?
>
> Karl
More information about the Squeak-dev
mailing list
|