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 2976

Summary: [Patch] Fix RGBA<->RGBA blit that was broken with the optimization from Bug 11
Product: SDL Reporter: id.zeta <id.zeta>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus, sezeroz
Version: HG 2.0   
Hardware: All   
OS: All   
Attachments: PATCH

Description id.zeta 2015-05-04 11:57:11 UTC
Created attachment 2148 [details]
PATCH

The optimization from Bug 11 added a code branch on cases where the source RGB masks match the destination RGB masks and a optimized blit function Blit4to4MaskAlpha that always overrides the source alpha info would be chosen. Unfortunately, the branch also errorneously took over the RGBA<->RGBA blitting cases where the source alpha info should be copied, while they would instead get overriden in Blit4to4MaskAlpha.

The attached patch fixes that by handling the RGBA<->RGBA cases correctly in that branch with the original BlitNtoNCopyAlpha as well as uses an optimized Blit4to4CopyAlpha along the same vein.
Comment 1 Sam Lantinga 2015-05-05 04:48:15 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/0bd764eb2b99
Comment 2 Ozkan Sezer 2015-05-27 06:47:33 UTC
Will this be ported back to SDL-1.2 ?
Comment 3 Ryan C. Gordon 2015-05-28 19:14:31 UTC
(In reply to Ozkan Sezer from comment #2)
> Will this be ported back to SDL-1.2 ?

Likely not.

Even if we put it in revision control, we have no intention to release an SDL 1.2.16.

--ryan.