mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 17:38:36 +00:00
[BeOS]Bu 283225. More reliable native lock-unlock code, p=sergei_d, r=thesusckiestemail, BeOS-only
This commit is contained in:
parent
8c793bee50
commit
a52ecf6271
@ -247,16 +247,26 @@ bool nsDrawingSurfaceBeOS :: LockDrawable()
|
||||
{
|
||||
//TODO: try to avoid exta locking also for onscreen BView.
|
||||
//Perhaps it needs synchronization with widget through nsToolkit and lock counting.
|
||||
bool rv = true;
|
||||
bool rv = false;
|
||||
if (!mBitmap)
|
||||
rv = mView->LockLooper();
|
||||
{
|
||||
// Non-bitmap (BWindowed) view - lock it as required if exists
|
||||
rv = mView && mView->LockLooper();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Was locked in Init(), only test
|
||||
rv = mBitmap->Lock();
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
void nsDrawingSurfaceBeOS :: UnlockDrawable()
|
||||
{
|
||||
if (!mView)
|
||||
// Do nothing, bitmap is locked for lifetime in our implementation
|
||||
if (mBitmap)
|
||||
return;
|
||||
else
|
||||
// Non-bitmap (BWindowed) view - unlock it as required.
|
||||
if (mView)
|
||||
mView->UnlockLooper();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user