* Implemented a new client allocation method: instead of having all bitmaps of

all teams in serveral server areas, and instead of having to eventually clone
  them all several times in BBitmap, we now have one or more areas per team,
  and BBitmap will only clone areas once if needed. As a side effect, this
  method should be magnitudes faster than the previous version.
* This method is also much more secure: instead of putting the allocation
  maintenance structures into those everyone-read-write areas, they are now
  separated, so that faulty applications cannot crash the app_server this
  way anymore. This should fix bug #172.
* Freeing memory is not yet implemented though! (although all memory will
  be freed upon app exit)
* There are now 3 different bitmap allocation strategies: per ClientMemoryAllocator
  (ie. via ServerApp), per area (for overlays, not yet implemented), and using
  malloc()/free() for server-only bitmaps.
* ServerBitmap now deletes its buffers itself.
* Cleaned up BBitmap and BApplication a bit.
* The test environment currently doesn't build anymore, will fix it next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16826 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-03-18 13:43:26 +00:00
parent 66b7a0f477
commit 9a44fdc97c
21 changed files with 755 additions and 275 deletions
+4 -4
View File
@@ -1331,7 +1331,7 @@ BView::DragMessage(BMessage *message, BBitmap *image,
message->Flatten(buffer, bufferSize);
fOwner->fLink->StartMessage(AS_LAYER_DRAG_IMAGE);
fOwner->fLink->Attach<int32>(image->get_server_token());
fOwner->fLink->Attach<int32>(image->_ServerToken());
fOwner->fLink->Attach<int32>((int32)dragMode);
fOwner->fLink->Attach<BPoint>(offset);
fOwner->fLink->Attach<int32>(bufferSize);
@@ -2235,7 +2235,7 @@ BView::DrawBitmapAsync(const BBitmap *bitmap, BRect srcRect, BRect dstRect)
check_lock();
fOwner->fLink->StartMessage(AS_LAYER_DRAW_BITMAP);
fOwner->fLink->Attach<int32>(bitmap->get_server_token());
fOwner->fLink->Attach<int32>(bitmap->_ServerToken());
fOwner->fLink->Attach<BRect>(dstRect);
fOwner->fLink->Attach<BRect>(srcRect);
@@ -2268,7 +2268,7 @@ BView::DrawBitmapAsync(const BBitmap *bitmap, BPoint where)
check_lock();
fOwner->fLink->StartMessage(AS_LAYER_DRAW_BITMAP);
fOwner->fLink->Attach<int32>(bitmap->get_server_token());
fOwner->fLink->Attach<int32>(bitmap->_ServerToken());
BRect src = bitmap->Bounds();
BRect dst = src.OffsetToCopy(where);
fOwner->fLink->Attach<BRect>(dst);
@@ -4320,7 +4320,7 @@ BView::_SetViewBitmap(const BBitmap* bitmap, BRect srcRect,
if (!do_owner_check())
return B_ERROR;
int32 serverToken = bitmap ? bitmap->get_server_token() : -1;
int32 serverToken = bitmap ? bitmap->_ServerToken() : -1;
fOwner->fLink->StartMessage(AS_LAYER_SET_VIEW_BITMAP);
fOwner->fLink->Attach<int32>(serverToken);