Remove locking when drawing the decorator buttons. This is most probably not
correct, but it prevents a deadlock that could sometimes be seen right after booting when the Terminal was supposed to draw the decorator buttons. It doesn't seem to cause any problems with locking removed (the original drawing code didn't lock either). Added a TODO to investigate and eventually fix that though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26170 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
81c9dc3dd5
commit
d0b2c3e1b8
@ -1093,13 +1093,13 @@ DefaultDecorator::_DrawButtonBitmap(ServerBitmap *bitmap, BRect rect)
|
||||
if (bitmap == NULL)
|
||||
return;
|
||||
|
||||
if (fDrawingEngine->LockParallelAccess()) {
|
||||
bool copyToFrontEnabled = fDrawingEngine->CopyToFrontEnabled();
|
||||
fDrawingEngine->SetCopyToFrontEnabled(true);
|
||||
fDrawingEngine->DrawBitmap(bitmap, rect.OffsetToCopy(0, 0), rect);
|
||||
fDrawingEngine->SetCopyToFrontEnabled(copyToFrontEnabled);
|
||||
fDrawingEngine->UnlockParallelAccess();
|
||||
}
|
||||
// TODO: find out why locking sometimes deadlocks here and re-add locking
|
||||
// once the problem is fixed (or remove this comment if locking isn't
|
||||
// necessary at all...)
|
||||
bool copyToFrontEnabled = fDrawingEngine->CopyToFrontEnabled();
|
||||
fDrawingEngine->SetCopyToFrontEnabled(true);
|
||||
fDrawingEngine->DrawBitmap(bitmap, rect.OffsetToCopy(0, 0), rect);
|
||||
fDrawingEngine->SetCopyToFrontEnabled(copyToFrontEnabled);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user