Thanks to Axel's change, now we can pass the app_server's colormap to libbe. Methods like BScreen::ColorMap() and BScreen::ColorForIndex() work.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13023 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2005-06-09 04:36:00 +00:00
parent 2a1492f0fa
commit 2ed35bc88c
2 changed files with 4 additions and 11 deletions

View File

@ -189,11 +189,9 @@ BPrivateScreen::IndexForColor(uint8 red, uint8 green, uint8 blue, uint8 alpha)
blue == B_TRANSPARENT_COLOR.blue && alpha == B_TRANSPARENT_COLOR.alpha)
return B_TRANSPARENT_8_BIT;
uint8 index = ((red & 0xf8) << 7) | ((green & 0xf8) << 2) | (blue >> 3);
if (fColorMap)
return fColorMap->index_map[((red & 0xf8) << 7)
| ((green & 0xf8) << 2)
| (blue >> 3)];
return fColorMap->index_map[index];
return 0;
}
@ -473,9 +471,7 @@ BPrivateScreen::BPrivateScreen()
if (reply == SERVER_TRUE) {
fColorMap = (color_map *)malloc(sizeof(color_map));
fOwnsColorMap = true;
// TODO: This doesn't work. We probably ran into a port
// capacity issue ?
//link.Read<color_map>(fColorMap);
link.Read<color_map>(fColorMap);
}
}

View File

@ -1769,10 +1769,7 @@ printf("ServerApp %s: AS_SCREEN_GET_MODE\n", fSignature.String());
link.Read<screen_id>(&id);
fLink.StartMessage(SERVER_TRUE);
// TODO: this doesn't seem to work.
//See also comment in BPrivateScreen::BPrivateScreen()
//fLink.Attach<color_map>(*SystemColorMap());
fLink.Attach<color_map>(*SystemColorMap());
fLink.Flush();
break;
}