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 - [Patch] Fix RGBA<->RGBA blit that was broken with the optimization from Bug 11
Summary: [Patch] Fix RGBA<->RGBA blit that was broken with the optimization from Bug 11
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-04 11:57 UTC by id.zeta
Modified: 2015-05-28 19:14 UTC (History)
2 users (show)

See Also:


Attachments
PATCH (1.97 KB, patch)
2015-05-04 11:57 UTC, id.zeta
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.