[squeak-dev] duplicated rectangles in DamageRecorder

Yoshiki Ohshima yoshiki at vpri.org
Thu Oct 1 20:03:06 UTC 2009


  Hello,

  I noticed that I often get duplicated (i.e. equal) rectangles in
invalidRects of DamageRecorder.

  In #recordInvalidRect: you make the part to read:

	invalidRects do:
		[:rect |
		       (newRect origin = rect origin and: [newRect corner = rect corner])
		       	 ifTrue: [Display reverse: newRect].
                       ...

and you'll see when it happens.

  If I understand it correctly the duplicate there doesn't result in
multiple drawing (via the 'validList' logic), but I do see a bit of
improvement in browser opening benchmarks etc. (2% or such, could be
just jitter, though), if I change "Display reverse: newRect" to "^
self".

  I'd like to hear if this makes any sense, or more consistent
benchmark results, etc.

-- Yoshiki



More information about the Squeak-dev mailing list