Closed
Bug 539165
Opened 15 years ago
Closed 15 years ago
gradients with a single stop do not have their color multiplied by the alpha.
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
VERIFIED
FIXED
mozilla1.9.3a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | .2-fixed |
status1.9.1 | --- | unaffected |
People
(Reporter: jrmuizel, Assigned: jrmuizel)
References
Details
(Keywords: verified1.9.2)
Attachments
(1 file, 3 obsolete files)
7.33 KB,
patch
|
beltzner
:
approval1.9.2.2+
|
Details | Diff | Splinter Review |
This cairo commit caused the problem: 2d790daa957471670f4ae0d3b22da89e4ee7111f. It was merged into mozilla-central in: 1effb72d30cf
The attached patch reverts the 'optimization' that removed the multiplication by alpha. I'll throw a reftest together for this when I get the chance.
Attachment #421194 -
Flags: review?(roc)
Assignee | ||
Updated•15 years ago
|
Attachment #421194 -
Attachment is patch: true
Attachment #421194 -
Attachment mime type: application/octet-stream → text/plain
Assignee | ||
Comment 1•15 years ago
|
||
This is a regression from 3.5 but I don't think it's that serious. It only breaks single stop gradients with alpha on win32 and it has been broken since March without anyone noticing.
Flags: wanted1.9.2?
Assignee | ||
Updated•15 years ago
|
Attachment #421194 -
Flags: approval1.9.2.1?
Attachment #421194 -
Flags: review?(roc) → review+
We should add a reftest here.
Assignee | ||
Comment 3•15 years ago
|
||
How about this?
Assignee: nobody → jmuizelaar
Attachment #421198 -
Flags: review?(roc)
Assignee | ||
Updated•15 years ago
|
OS: Mac OS X → Windows 7
Comment on attachment 421198 [details] [diff] [review]
reftest
super, thanks
Attachment #421198 -
Flags: review?(roc) → review+
Assignee | ||
Comment 5•15 years ago
|
||
Multi-stop solid gradients are broken too. This patch includes fixes for both cases, but is basically the same as the last one. This one properly passes the reftest that I posted earlier.
Attachment #421194 -
Attachment is obsolete: true
Attachment #421198 -
Attachment is obsolete: true
Attachment #421279 -
Flags: review?(roc)
Attachment #421194 -
Flags: approval1.9.2.1?
Comment 6•15 years ago
|
||
reftest.list needs updating to current trunk where I changed when the opacity 01 reftest runs. I think OSX 10.4 support may be going away though.
Attachment #421279 -
Flags: review?(roc) → review+
Assignee | ||
Comment 7•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 8•15 years ago
|
||
Backed out die to reftest failures on OSX:
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/mozilla-central-macosx-opt-unittest-everythingelse/build/reftest/tests/layout/reftests/svg/opacity-and-gradient-02.svg |
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 9•15 years ago
|
||
Here are the failure logs (for OSX debug & optimized runs):
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1263335364.1263338799.19956.gz
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1263338840.1263341556.19260.gz
Assignee | ||
Comment 10•15 years ago
|
||
This happens because OS X doesn't draw the gradient as a solid color. I think it used to because I don't think a ran into this problem when I had the patch against an older version of trunk. roc, doing think any of our gradient changes would cause this behaviour change?
Assignee | ||
Comment 11•15 years ago
|
||
Nevermind, I had thought this passed on the try server. I looked back and it looks like it didn't...
Assignee | ||
Comment 12•15 years ago
|
||
Anyone have any suggestions for how to fix this test?
Does the test pass if the reference uses a single-stop opaque red gradient, and you apply opacity="0.5" to that?
Comment 14•15 years ago
|
||
The colors on the left hand side are out by 1 #7F7F00 vs #807F00. It it cairo that is calculating this or does cairo make OS X Core Graphics calls to do this.
Tweaking the colours or the opacity may help to sidestep if this is some kind of rounding error when the opacity is applied to the color values. You've gone for red (i.e. FF0000) divided by 2 to get #7F or #80. If you went for some RGB values where the r, g and b values are divisible by 2 you might fare better.
Assignee | ||
Comment 15•15 years ago
|
||
(In reply to comment #14)
> The colors on the left hand side are out by 1 #7F7F00 vs #807F00. It it cairo
> that is calculating this or does cairo make OS X Core Graphics calls to do
> this.
Mostly CoreGraphics.
>
> Tweaking the colours or the opacity may help to sidestep if this is some kind
> of rounding error when the opacity is applied to the color values. You've gone
> for red (i.e. FF0000) divided by 2 to get #7F or #80. If you went for some RGB
> values where the r, g and b values are divisible by 2 you might fare better.
I tried this kind of thing without much success.
(In reply to comment #13)
> Does the test pass if the reference uses a single-stop opaque red gradient, and
> you apply opacity="0.5" to that?
I'll give this a try.
Assignee | ||
Comment 16•15 years ago
|
||
Attachment #421279 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Attachment #422995 -
Flags: approval1.9.2.1?
Assignee | ||
Updated•15 years ago
|
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Comment 18•15 years ago
|
||
Comment on attachment 422995 [details] [diff] [review]
The patch that landed on trunk
a1.9.2.2=beltzner
Attachment #422995 -
Flags: approval1.9.2.2? → approval1.9.2.2+
Updated•15 years ago
|
Flags: wanted1.9.2?
Comment 19•15 years ago
|
||
status1.9.2:
--- → .2-fixed
Comment 20•15 years ago
|
||
Reftests have been passed since the check-in happened on trunk and 1.9.2. Given the greenish waterfall on tinderbox I'll mark it verified fixed.
Jeff, can you please also set in-testsuite+ for checked-in tests? Thanks.
Status: RESOLVED → VERIFIED
status1.9.1:
--- → unaffected
Flags: in-testsuite+
Flags: in-litmus-
Keywords: verified1.9.2
OS: Windows 7 → All
Hardware: x86 → All
Target Milestone: --- → mozilla1.9.3a1
You need to log in
before you can comment on or make changes to this bug.
Description
•