зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug # 144337: According to TechNote 2051, on Mac OS X we should be able to short-circuit QuickDraw's implicit LockPortBits() on every QD call by stratetic usage of ::LockPortBits() and ::UnlockPortBits(). Gives a few % points improvement on window drawing/updates. r=sdagley sr=ben
This commit is contained in:
Родитель
08a56d1b42
Коммит
8332819ea7
|
@ -1420,7 +1420,7 @@ else
|
|||
StRegionFromPool damagedRgn;
|
||||
if (!damagedRgn)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
::GetPortVisibleRegion(GetWindowPort(mWindowPtr), damagedRgn);
|
||||
::GetPortVisibleRegion(::GetWindowPort(mWindowPtr), damagedRgn);
|
||||
|
||||
/*
|
||||
#ifdef PAINT_DEBUGGING
|
||||
|
@ -1450,6 +1450,14 @@ else
|
|||
|
||||
if (!::EmptyRgn(updateRgn))
|
||||
{
|
||||
|
||||
#if TARGET_CARBON
|
||||
// Ref: http://developer.apple.com/technotes/tn/tn2051.html
|
||||
// short-circuit QD's implicit LockPortBits()
|
||||
// Note: MUST unlock before exiting this scope (see below)
|
||||
::LockPortBits(::GetWindowPort(mWindowPtr));
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
// measure the time it takes to refresh the window, if the control key is down.
|
||||
unsigned long long start, finish;
|
||||
|
@ -1542,6 +1550,14 @@ else
|
|||
// Copy updateRgn to regionToValidate
|
||||
if (regionToValidate)
|
||||
::CopyRgn(updateRgn, regionToValidate);
|
||||
|
||||
#if TARGET_CARBON
|
||||
// Ref: http://developer.apple.com/technotes/tn/tn2051.html
|
||||
// short-circuit QD's implicit LockPortBits()
|
||||
// Note: unlock before exiting (locked above)
|
||||
::UnlockPortBits(::GetWindowPort(mWindowPtr));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#if PINK_PROFILING
|
||||
|
|
Загрузка…
Ссылка в новой задаче