moved the place of implementation of locking in DisplayDriver, because the Painter version has it elsewhere. the DisplayDriver locking API is now abstract, the same locking is now in DisplayDriverImpl, Painter version uses HWInterface for locking
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12084 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -50,10 +50,10 @@ UpdateQueue::InitCheck()
|
||||
void
|
||||
UpdateQueue::AddRect(const BRect& rect)
|
||||
{
|
||||
Lock();
|
||||
// Lock();
|
||||
fUpdateRegion.Include(rect);
|
||||
_Reschedule();
|
||||
Unlock();
|
||||
// Unlock();
|
||||
}
|
||||
|
||||
// _execute_updates_
|
||||
@@ -76,16 +76,13 @@ UpdateQueue::_ExecuteUpdates()
|
||||
case B_OK:
|
||||
case B_TIMED_OUT:
|
||||
// execute updates
|
||||
if (Lock()) {
|
||||
// if (fInterface->Lock()) {
|
||||
int32 count = fUpdateRegion.CountRects();
|
||||
for (int32 i = 0; i < count; i++) {
|
||||
fInterface->CopyBackToFront(fUpdateRegion.RectAt(i));
|
||||
}
|
||||
// fInterface->Unlock();
|
||||
fUpdateRegion.MakeEmpty();
|
||||
// }
|
||||
Unlock();
|
||||
if (fInterface->LockWithTimeout(20000) >= B_OK) {
|
||||
int32 count = fUpdateRegion.CountRects();
|
||||
for (int32 i = 0; i < count; i++) {
|
||||
fInterface->CopyBackToFront(fUpdateRegion.RectAt(i));
|
||||
}
|
||||
fUpdateRegion.MakeEmpty();
|
||||
fInterface->Unlock();
|
||||
}
|
||||
break;
|
||||
case B_BAD_SEM_ID:
|
||||
|
||||
Reference in New Issue
Block a user