Closed
Bug 1198996
Opened 9 years ago
Closed 9 years ago
Layer::GetLocalOpacity() can return values outside of 0..1 range triggering Skia assertion in DrawTargetSkia
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: lsalzman, Assigned: lsalzman)
References
Details
Attachments
(1 file)
1.01 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
In SkColor.h:SkColorSetARBInline(U8CPU a, U8CPU r, U8CPU g, U8CPU b) we're triggering the following assertion:
SkASSERT(a <= 255 && r <= 255 && g <= 255 && b <= 255);
The a value is exceeding 255, because inside the SkPaint setup we're passing in an alpha value exceeding 1 before conversion, and this value is originating from Layer::GetEffectiveOpacity().
Note that since GetEffectiveOpacity() is multiplying the result of GetLocalOpacity() together, if these values are outside the 0..1 range the result can be even more generally bogus if any of the intermediate values is negative for some reason.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8653145 -
Flags: review?(bas)
Updated•9 years ago
|
Attachment #8653145 -
Flags: review?(bas) → review+
Assignee | ||
Comment 2•9 years ago
|
||
Blocks: skia-reftest
Keywords: checkin-needed
Keywords: checkin-needed
How can GetLocalOpacity() get outside the range 0..1? That should never happen.
Comment 5•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #4)
> How can GetLocalOpacity() get outside the range 0..1? That should never
> happen.
It should never happen, except when it does... And then other stuff downwind blows up as a consequence.
I couldn't definitively track down the source, but it looks like there is some style animation of opacity that is sometimes, on the test machines, producing values slightly over the end of range.
You need to log in
before you can comment on or make changes to this bug.
Description
•