Implemented some more overlay support - the overlay bitmap is now allocated
via the graphics driver (but not yet shown on screen). I probably got the meaning of the "overlay count" wrong - I guess that you can allocate any number of overlay bitmaps, but can only see "overlay count" on screen at a time (right now, I only allow to create "overlay count" bitmaps). Stephan? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17193 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -928,12 +928,12 @@ BBitmap::_InitObject(BRect bounds, color_space colorSpace, uint32 flags,
|
||||
int8 allocationType;
|
||||
link.Read<int8>(&allocationType);
|
||||
|
||||
if (allocationType == kArea) {
|
||||
// TODO: implement me (server-side as well), needed for overlays
|
||||
if (allocationType == kFramebuffer) {
|
||||
link.Read<addr_t>((addr_t*)&fBasePointer);
|
||||
link.Read<int32>(&fBytesPerRow);
|
||||
|
||||
fServerArea = B_ERROR;
|
||||
fAreaOffset = -1;
|
||||
// that signals the cleanup code to delete our area
|
||||
fBasePointer = NULL;
|
||||
fAreaOffset = 0;
|
||||
} else {
|
||||
link.Read<area_id>(&fServerArea);
|
||||
link.Read<int32>(&fAreaOffset);
|
||||
@@ -1012,11 +1012,6 @@ BBitmap::_CleanUp()
|
||||
|
||||
// TODO: we may want to delete parts of the server memory areas here!
|
||||
|
||||
if (fAreaOffset == -1) {
|
||||
// we own that area, so we have to delete it
|
||||
delete_area(fArea);
|
||||
}
|
||||
|
||||
fArea = -1;
|
||||
fServerToken = -1;
|
||||
fAreaOffset = -1;
|
||||
|
||||
Reference in New Issue
Block a user