Closed
Bug 1209715
Opened 6 years ago
Closed 6 years ago
Give DrawResult operators to make it easier to combine different DrawResults
Categories
(Core :: ImageLib, defect)
Core
ImageLib
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: seth, Assigned: seth)
References
Details
Attachments
(1 file)
6.58 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
Right now we only combine different DrawResults in nsCSSRendering::PaintBackgroundWithSC(), but to fix 1209703 we're going to have to combine them in *many* places, because borders are frequently drawn using loops. This operation is going to be so common that I think operator overloads are justified. The operators that I think make the most sense to use for this are the bitwise AND operators, because conceptually combining DrawResults works in the same way as bitwise AND: the result is DrawResult::SUCCESS only if both operands are DrawResult::SUCCESS, and otherwise the result is failure. The details are slightly more complicated, because DrawResult::BAD_IMAGE should also be sticky; see the comments in the patch for details.
Assignee | ||
Comment 1•6 years ago
|
||
(In reply to Seth Fowler [:seth] [:s2h] from comment #0) > DrawResult::BAD_IMAGE should > also be sticky; see the comments in the patch for details. Actually I stated this exactly backwards - DrawResult::BAD_IMAGE is explicitly non-sticky, because we want to know if there were any recoverable failures that might go away if we do another paint. So we only want to return DrawResult::BAD_IMAGE if there were no recoverable failures. Unlike comment 0, the comments in the patch get this right. =)
Updated•6 years ago
|
Attachment #8667515 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 3•6 years ago
|
||
Thanks for the review!
Assignee | ||
Comment 4•6 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4d87d0f8b704
https://hg.mozilla.org/mozilla-central/rev/4d87d0f8b704
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•