mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
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 <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk> Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
This commit is contained in:
parent
f72d1684e5
commit
0edecdc00e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user