#TUNING by cg
class: UIGalleryView
draw by sending messages to gc instead of self.
(new GC structure)
--- a/UIGalleryView.st Tue Jan 24 23:29:50 2017 +0100
+++ b/UIGalleryView.st Tue Jan 24 23:32:06 2017 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG
All Rights Reserved
@@ -654,16 +652,16 @@
"redraw all items selected"
(shown and:[selection notNil and:[hiddenCounter == 0]]) ifTrue:[
- self clippedByChildren:false.
+ gc clippedByChildren:false.
self handlesOf:selection do:[:aRectangle|
- self paint:self blackColor.
- self fillRectangle:aRectangle.
+ gc paint:self blackColor.
+ gc fillRectangle:aRectangle.
- self paint:self whiteColor.
- self displayRectangle:(aRectangle insetBy:0).
+ gc paint:self whiteColor.
+ gc displayRectangle:(aRectangle insetBy:0).
].
- self clippedByChildren:true.
+ gc clippedByChildren:true.
].
!
@@ -689,13 +687,13 @@
hiddenCounter := hiddenCounter + 1.
hiddenCounter == 1 ifTrue:[
(shown and:[selection notNil]) ifTrue:[
- self clippedByChildren:false.
+ gc clippedByChildren:false.
self handlesOf:selection do:[:aRectangle|
self clearRectangle:aRectangle.
self invalidateRectangle:aRectangle repairNow:false.
].
- self clippedByChildren:true.
+ gc clippedByChildren:true.
r := selection bounds.
@@ -705,7 +703,8 @@
(sv bounds intersects:r) ifTrue:[
sv isView ifTrue:[
- sv borderColor:(self whiteColor). "/ kludge to force a redraw
+ "/ kludge to force a redraw
+ sv borderColor:(self whiteColor).
sv borderColor:(self blackColor).
sv withAllSubViewsDo:[:v|