mmlr + stippi:
Found an incompatibility with BeOS, where Haiku behaves correctly, though, after our changes: The alpha channel of B_RGB32 bitmaps is ignored, but B_TRANSPARENT_MAGIC_RGBA32 pixels are considered fully transparent. In BeOS, B_RGB32 are simply treated as B_RGBA32, but only in B_OP_ALPHA. We have added a comment as well as the code that would enabled the BeOS behavior. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26436 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1430,8 +1430,20 @@ Painter::_DrawBitmap(agg::rendering_buffer& srcBuffer, color_space format,
|
|||||||
BBitmap* temp = NULL;
|
BBitmap* temp = NULL;
|
||||||
ObjectDeleter<BBitmap> tempDeleter;
|
ObjectDeleter<BBitmap> tempDeleter;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ((format != B_RGBA32 && format != B_RGB32)
|
if ((format != B_RGBA32 && format != B_RGB32)
|
||||||
|| (format == B_RGB32 && fDrawingMode != B_OP_COPY)) {
|
|| (format == B_RGB32 && fDrawingMode != B_OP_COPY
|
||||||
|
#if 0
|
||||||
|
// Enabling this would make the behavior compatible to BeOS, which
|
||||||
|
// treats B_RGB32 bitmaps as B_RGB*A*32 bitmaps in B_OP_ALPHA - unlike in
|
||||||
|
// all other drawing modes, where B_TRANSPARENT_MAGIC_RGBA32 is handled.
|
||||||
|
// B_RGB32 bitmaps therefore don't draw correctly on BeOS if they actually
|
||||||
|
// use this color, unless the alpha channel contains 255 for all other
|
||||||
|
// pixels, which is inconsistent.
|
||||||
|
&& fDrawingMode != B_OP_ALPHA)
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
temp = new (nothrow) BBitmap(actualBitmapRect, B_BITMAP_NO_SERVER_LINK,
|
temp = new (nothrow) BBitmap(actualBitmapRect, B_BITMAP_NO_SERVER_LINK,
|
||||||
B_RGBA32);
|
B_RGBA32);
|
||||||
if (temp == NULL) {
|
if (temp == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user