We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 843 - Wrong blitting in testalpha test
Summary: Wrong blitting in testalpha test
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-12 09:45 UTC by Mike Gorchak
Modified: 2011-01-21 12:51 UTC (History)
0 users

See Also:


Attachments
Screenshot of the issue (40.75 KB, image/png)
2009-10-12 09:45 UTC, Mike Gorchak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gorchak 2009-10-12 09:45:09 UTC
Created attachment 415 [details]
Screenshot of the issue

1) If you run testalpha test in 24 bpp (./testalpha -bpp 24) mode, you'll see
sometimes (when alpha value slides up/down and becoming 255 again) that masking
is not working. How to reproduce: run in 24 bpp mode (using other color depth
modes this bug is not reproducible), and wait while "smile" sprite opacity is
sliding. See the attached screenshot.

2) When testalpha is running in 24 bpp mode, press right mouse button and test
will be terminated due to segfault in SDL software blit internals (the test
tries to fill black rectangle at mouse cursor position).

3) Run this test in 32 bpp mode (./testalpha -bpp 32) and "smile"'s opacity is
not sliding (sticked at minimum alpha value), but all works fine in 15/16/24
bpp modes.
Comment 1 Ryan C. Gordon 2009-12-15 00:02:41 UTC
Tossing bug to Sam.

--ryan.
Comment 2 Sam Lantinga 2009-12-16 22:06:02 UTC
1) This was a bug in the slow blitter, fixed in revision 5423.  Thanks!

2) I wasn't able to reproduce this.  Is it still happening in the current snapshot?

3) This isn't technically a bug, though I'm wondering if the behavior should be changed.  See the note in SDL_SetAlpha() in SDL_compat.c:
751	        /* According to the docs, value is ignored for alpha surfaces */
752	        if (surface->format->Amask) {
753	            value = 0xFF;
754	        }