* BView::FillRegion() sends the BRegion data instead of decomposing

it and rebuilding it on the server side (that causes a huge speed
  up for regions containing many rects)
* There is a method in ServerLink that could have been used, but I
  actually needed to add the direct BRegion support to LinkReceiver
* added LinkReceiver as a friend to BRegion class
* ServerApp and ServerWindow keep the CursorManager locked after they
  have retrieved a cursor until they have called Acquire() on the
  cursor. (Axel: what good is using atomic* stuff in Acquire() and
  Release() if we have to protect this by a lock anyways?)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16957 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2006-04-01 16:56:10 +00:00
parent b22badf221
commit 600fbd78e4
6 changed files with 54 additions and 38 deletions
+5 -12
View File
@@ -2714,19 +2714,12 @@ BView::FillRegion(BRegion *region, ::pattern pattern)
_UpdatePattern(pattern);
int32 count = region->CountRects();
fOwner->fLink->StartMessage(AS_FILL_REGION);
fOwner->fLink->AttachRegion(*region);
// TODO: make this automatically chose
// to send over area or handle failure here?
if (count * sizeof(BRect) < MAX_ATTACHMENT_SIZE) {
fOwner->fLink->StartMessage(AS_FILL_REGION);
fOwner->fLink->Attach<int32>(count);
for (int32 i = 0; i < count; i++)
fOwner->fLink->Attach<BRect>(region->RectAt(i));
_FlushIfNotInTransaction();
} else {
// TODO: send via area
}
_FlushIfNotInTransaction();
}