Closed Bug 183427 Opened 23 years ago Closed 23 years ago

Re-enable GDI alphablending

Categories

(Core Graveyard :: Image: Painting, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: paper, Assigned: paper)

References

Details

Attachments

(2 files)

Regression from Bug 157521 caused GDI alphablending to be always turned off. Part of the patch in 157521 that did it: - if (gPlatform == VER_PLATFORM_WIN32_WINDOWS && mSizeImage >= 0xFF0000) - mCanOptimize = PR_FALSE; - else if ((8 != mAlphaDepth) || CanAlphaBlend()) - mCanOptimize = PR_TRUE; + if ((gPlatform == VER_PLATFORM_WIN32_WINDOWS && mSizeImage >= 0xFF0000) || (mAlphaDepth == 8) || (!CanAlphaBlend()) ){ + return NS_OK; + } The || needs to be an &&. We can't optimize only in the case where alphadepth is 8 and !CanAlphaBlend (as well as that imagesize limit)
Attached patch The PatchSplinter Review
I've also moved the mSizeImage 0 check up, as recommended by kin in Bug 157521 Comment 4
Blocks: 183424
Comment on attachment 108188 [details] [diff] [review] The Patch dcone, since this bug was caused by your checkin, could you review?
Attachment #108188 - Flags: review?(dcone)
Comment on attachment 108188 [details] [diff] [review] The Patch rods, kin, could your r/sr since you two r/sr'd the patch that caused this regression? It's an AND/OR logic-type patch, plus a combining of a if statement.. no real knowledge of nsImageWin is needed.
Attachment #108188 - Flags: superreview?(kin)
Attachment #108188 - Flags: review?(rods)
Attachment #108188 - Flags: review?(dcone)
Attachment #108188 - Flags: superreview?(kin) → superreview+
Attachment #108188 - Flags: review?(rods) → review?(smontagu)
Comment on attachment 108188 [details] [diff] [review] The Patch r=smontagu, and if you added some comments to the condition before checking in I would be even happier.
Attachment #108188 - Flags: review?(smontagu) → review+
checked in earlier today
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: