* 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:
@@ -5,17 +5,20 @@
|
||||
* Authors:
|
||||
* Pahtz <[email protected]>
|
||||
* Axel Dörfler
|
||||
* Stephan Aßmus <[email protected]>
|
||||
*/
|
||||
|
||||
/** Class for low-overhead port-based messaging */
|
||||
|
||||
#include <LinkReceiver.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <new>
|
||||
|
||||
#include <ServerProtocol.h>
|
||||
#include <LinkReceiver.h>
|
||||
#include <String.h>
|
||||
#include <Region.h>
|
||||
|
||||
#include "link_message.h"
|
||||
|
||||
@@ -396,4 +399,22 @@ err:
|
||||
return status;
|
||||
}
|
||||
|
||||
status_t
|
||||
LinkReceiver::ReadRegion(BRegion* region)
|
||||
{
|
||||
status_t status = Read(®ion->count, sizeof(int32));
|
||||
if (status >= B_OK)
|
||||
status = Read(®ion->bound, sizeof(clipping_rect));
|
||||
if (status >= B_OK) {
|
||||
region->set_size(region->count);
|
||||
status = Read(region->data, region->count * sizeof(clipping_rect));
|
||||
if (status < B_OK)
|
||||
region->MakeEmpty();
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
} // namespace BPrivate
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user