BBitmap: Amend special-casing for B_RGB32 in SetBits.
* Spirograph uses SetBits with length 1 und 4, which can't work as expected. As Spirograph uses the same source and target colorspace, the memcpy codepath is used with the right length. * fix #12931 Change-Id: I4f27e748fb842c2d81d4161e7c94586844995bdf Reviewed-on: https://review.haiku-os.org/c/haiku/+/8562 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]> Haiku-Format: Haiku-format Bot <[email protected]>
This commit is contained in:
@@ -665,8 +665,8 @@ BBitmap::SetBits(const void* data, int32 length, int32 offset,
|
||||
int32 inBPR = -1;
|
||||
// tweaks to mimic R5 behavior
|
||||
if (error == B_OK) {
|
||||
if (colorSpace == B_RGB32) {
|
||||
// B_RGB32 means actually unpadded B_RGB24_BIG
|
||||
if (colorSpace == B_RGB32 && (length % 3) == 0) {
|
||||
// B_RGB32 could actually mean unpadded B_RGB24_BIG
|
||||
colorSpace = B_RGB24_BIG;
|
||||
inBPR = width * 3;
|
||||
} else if (colorSpace == B_CMAP8 && fColorSpace != B_CMAP8) {
|
||||
|
||||
Reference in New Issue
Block a user