[squeak-dev] The Inbox: Morphic-dtl.634.mcz

Chris Muller asqueaker at gmail.com
Mon Jan 14 01:53:07 UTC 2013


Thanks Dave, I'll try it out with Maui.  Would the reason there might
be potential performance issues be due to the call to outerBounds or
the fact that it is more liberal with invalidating regions and
therefore causing more drawing code to run?

On Sun, Jan 13, 2013 at 12:53 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> This is a fix for the "very old buglet" reported by Bob Arning. I'd appreciate
> if someone could review this before I move it to trunk, as it may have performance
> implications.
>
> Dave
>
> On Sun, Jan 13, 2013 at 06:49:13PM +0000, commits at source.squeak.org wrote:
>> A new version of Morphic was added to project The Inbox:
>> http://source.squeak.org/inbox/Morphic-dtl.634.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Morphic-dtl.634
>> Author: dtl
>> Time: 13 January 2013, 1:48:33.942 pm
>> UUID: 02716c40-7437-458c-80ff-22679fcd3c04
>> Ancestors: Morphic-dtl.633
>>
>> Fix for Morphic layout bug reported by Bob Arning in http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-January/167757.html
>>
>> Invalidate changed regions in Morph>>layoutBounds: in the same manner as in Morph>>doLayoutIn:
>>
>> =============== Diff against Morphic-dtl.633 ===============
>>
>> Item was changed:
>>   ----- Method: Morph>>layoutBounds: (in category 'layout') -----
>>   layoutBounds: aRectangle
>>       "Set the bounds for laying out children of the receiver.
>>       Note: written so that #layoutBounds can be changed without touching this method"
>> +     | priorBounds outer inner box |
>> +     priorBounds := self outerBounds.
>> -     | outer inner |
>>       outer := self bounds.
>>       inner := self layoutBounds.
>>       bounds := aRectangle origin + (outer origin - inner origin) corner:
>> +                             aRectangle corner + (outer corner - inner corner).
>> +     box := self outerBounds.
>> +     box = priorBounds
>> +             ifFalse: [self invalidRect: (priorBounds quickMerge: box)]!
>> -                             aRectangle corner + (outer corner - inner corner).!
>>
>


More information about the Squeak-dev mailing list