BitmapManager sets the _initialized flag to true when allocation is successful
Added a forgotten opcode in DispatchMessage::AS_CREATE_BITMAP We can now allocate (and use) BBitmaps in applications! git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4946 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -130,6 +130,7 @@ ServerBitmap * BitmapManager::CreateBitmap(BRect bounds, color_space space, int3
|
|||||||
bmp->_area=area_for(bmpbuffer);
|
bmp->_area=area_for(bmpbuffer);
|
||||||
bmp->_buffer=bmpbuffer;
|
bmp->_buffer=bmpbuffer;
|
||||||
bmp->_token=tokenizer.GetToken();
|
bmp->_token=tokenizer.GetToken();
|
||||||
|
bmp->_initialized=true;
|
||||||
|
|
||||||
// calculate area offset
|
// calculate area offset
|
||||||
area_info ai;
|
area_info ai;
|
||||||
|
|||||||
@@ -425,7 +425,6 @@ void ServerApp::_DispatchMessage(PortMessage *msg)
|
|||||||
}
|
}
|
||||||
case AS_CREATE_BITMAP:
|
case AS_CREATE_BITMAP:
|
||||||
{
|
{
|
||||||
debugger("");
|
|
||||||
// Allocate a bitmap for an application
|
// Allocate a bitmap for an application
|
||||||
|
|
||||||
// Attached Data:
|
// Attached Data:
|
||||||
@@ -464,6 +463,7 @@ debugger("");
|
|||||||
if(sbmp)
|
if(sbmp)
|
||||||
{
|
{
|
||||||
PortLink replylink(replyport);
|
PortLink replylink(replyport);
|
||||||
|
replylink.SetOpCode(SERVER_TRUE);
|
||||||
replylink.Attach<int32>(sbmp->Token());
|
replylink.Attach<int32>(sbmp->Token());
|
||||||
replylink.Attach<int32>(sbmp->Area());
|
replylink.Attach<int32>(sbmp->Area());
|
||||||
replylink.Attach<int32>(sbmp->AreaOffset());
|
replylink.Attach<int32>(sbmp->AreaOffset());
|
||||||
|
|||||||
Reference in New Issue
Block a user