Closed
Bug 1473714
Opened 6 years ago
Closed 6 years ago
FrameAnimator compares timestamps across processes
Categories
(Core :: Graphics: ImageLib, enhancement, P3)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla63
People
(Reporter: tjr, Assigned: tjr)
References
Details
(Keywords: assertion, Whiteboard: [gfx-noted])
Attachments
(1 file)
While working on Fuzzyfox, I started hitting this assertion: https://searchfox.org/mozilla-central/rev/403038737ba75af3842ba6b43b6e2fb47eb06609/image/FrameAnimator.cpp#241
> NS_ASSERTION(aTime <= TimeStamp::Now(),
> "Given time appears to be in the future");
This happens because aTime comes from the parent process and this code (and thus TimeStamp::Now()) executes in the content process. aTime comes from nsRefreshDriver.
Comparing timestamps across processes is problematic regardless of Fuzzyfox: there is no guarentee that such timestamps are consistent or in lockstep. Practically though it's unlikely to cause major issues unless one starts going to muck with time! And the default behavior of NS_ASSERTION is just to print a warning in debug mode (and nothing in release).
Empirical testing (observing gifs while seeing the warnings print in the console) indicates this doesn't really cause problems. (At least with the 100/2000 us settings I have for Fuzzyfox right now.)
Comment 1•6 years ago
|
||
I don't think there is any reason we need that assertion.
There are two other uses of Now in FrameAnimator:
-GetCurrentImgFrameEndTime uses Now plus a day for "forever" frame timeouts of animated images, not realistically a problem
-InitAnimationFrameTimeIfNecessary sets mCurrentAnimationFrameTime to Now which might actually cause confusion in the code that advances frames if the refresh driver time we get after this is actually before the saved time stamp, BUT we should never call into that code because FrameAnimator::RequestRefresh only advances frames if the current frame end time is in the past relative to the refresh driver time.
All other uses appear to view time as relative to the passed in refresh driver time that I can see.
Comment 2•6 years ago
|
||
I agree, it should just be removed.
Assignee | ||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment on attachment 8996827 [details]
Bug 1473714 Remove unneeded commit in image/FrameAnimator.cpp:AdvanceFrame
Timothy Nikkel (:tnikkel) has approved the revision.
https://phabricator.services.mozilla.com/D2622
Attachment #8996827 -
Flags: review+
Updated•6 years ago
|
Assignee: nobody → tom
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/465005e948bf
Remove unneeded commit in image/FrameAnimator.cpp:AdvanceFrame
Keywords: checkin-needed
Comment 6•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•6 years ago
|
status-firefox61:
--- → wontfix
status-firefox62:
--- → wontfix
status-firefox-esr52:
--- → wontfix
status-firefox-esr60:
--- → wontfix
You need to log in
before you can comment on or make changes to this bug.
Description
•