tmf: Fix rounding and range issues in periodic marker source
When the requested time range and reference are far apart, the floating
point calculations lose precision and can produce marker times that are
not multiples of the period but instead clamped to the nearest multiple
of a power of 2.
The calculations are modified to adjust the reference to a point that is
closer to the request time range, by converting the period to a fraction
representation, if possible, and using exact integer calculations.
Some rounding calculations are corrected to apply to smaller numbers.
When using alternate shading periodic markers, the first marker returned
could overlap with the start time. If this partially visible marker was
selected by the user, the 'previous marker' action would not find any
previous marker. The code is adjusted to make sure that the first marker
returned is the first fully non-visible previous marker.
Change-Id: I1a8ad36441bf44a735621ffe4361e73ee6faaa60
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/83545
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Hudson CI
This page took 0.025769 seconds and 5 git commands to generate.