[ Home | CW Bug Reports | Mail ]
LWindow::UpdatePort()無処理時高速化
Subject: SUG -- LWindow::UpdatePort() quick bail out
---------------------------------------------------------------------------
METROWERKS PRODUCT AND USAGE SECTION
Product name : [ CodeWarrior Professional ]
Product version : [ Pro 4 ]
Component name : [ PowerPlant ]
Generating: [ Mac OS 68K / Mac OS PowerPC ]
Purpose: [ application ]
---------------------------------------------------------------------------
SUGGESTION
LWindow::UpdatePort() should have the following code to avoid slow
region operations if there is no redraw area.
Especially, the CW Pro4 addition of UpdatePort() call in the
LView::ScrollImageBy() slows down scrolling a bit without this.
void
LWindow::UpdatePort()
{
// quick bail out if no redraw area.
// EmptyRgn() is a quite cheap operation.
if ( ::EmptyRgn(((WindowPeek)mMacWindowP)->updateRgn) ) return;
この Pageは MacOS X + Radio UserLand で作っています。