Simplify SVGSMILElement::ResolveInterval even more
First eliminate the |equals_minimum_ok| variable, and always pass true when searching the 'begin' instance list. Since currently the only way to set this to false is for the first interval, and for that interval we always start searching for the first instance time greater than Earliest(), we can make it always be true without problem. We also recognize zero-length intervals are not of any interest, as indicated by the: first && temp_begin == temp_end... and !first && temp_end == interval_.end clauses (note that |begin_after| == |interval_.end| when !first, and thus if |temp_begin| ends up being equal to |interval_.end| this is essentially checking that the interval isn't zero-length). Thus we can always look for an 'end' instance that is greater than |temp_begin| directly rather than checking for one that is potentially equal. This should also mean that any newly found end time (as we loop) will never equal the previous end that we got - allowing us to drop the |last_interval_temp_end| construct. Because we should no longer get zero-length intervals, we can drop the special case for temp_begin == 0 and temp_end == 0 (zero-length first interval that starts [and ends] at t=0). Bug: 998526 Change-Id: I4d27372b50d24879af91bd35d7156c5bf9a1271d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816547Reviewed-by:Stephen Chenney <schenney@chromium.org> Reviewed-by:
Philip Rogers <pdr@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#698558}
Showing
Please register or sign in to comment