| Index: cc/resources/tile_priority.cc
|
| diff --git a/cc/resources/tile_priority.cc b/cc/resources/tile_priority.cc
|
| index e25b61e138d6e7d28e74e12e8c0a970f8d6ceaac..d1c3fbf963c243d74e1e768a724f10b3bbebb0aa 100644
|
| --- a/cc/resources/tile_priority.cc
|
| +++ b/cc/resources/tile_priority.cc
|
| @@ -30,24 +30,24 @@ bool Range::IsEmpty() {
|
| return start_ >= end_;
|
| }
|
|
|
| -inline void IntersectNegativeHalfplane(Range& out, float previous,
|
| +inline void IntersectNegativeHalfplane(Range* out, float previous,
|
| float current, float target, float time_delta) {
|
| float time_per_dist = time_delta / (current - previous);
|
| float t = (target - current) * time_per_dist;
|
| if (time_per_dist > 0.0f)
|
| - out.start_ = std::max(out.start_, t);
|
| + out->start_ = std::max(out->start_, t);
|
| else
|
| - out.end_ = std::min(out.end_, t);
|
| + out->end_ = std::min(out->end_, t);
|
| }
|
|
|
| -inline void IntersectPositiveHalfplane(Range& out, float previous,
|
| +inline void IntersectPositiveHalfplane(Range* out, float previous,
|
| float current, float target, float time_delta) {
|
| float time_per_dist = time_delta / (current - previous);
|
| float t = (target - current) * time_per_dist;
|
| if (time_per_dist < 0.0f)
|
| - out.start_ = std::max(out.start_, t);
|
| + out->start_ = std::max(out->start_, t);
|
| else
|
| - out.end_ = std::min(out.end_, t);
|
| + out->end_ = std::min(out->end_, t);
|
| }
|
|
|
| } // namespace
|
| @@ -132,16 +132,16 @@ float TilePriority::TimeForBoundsToIntersect(const gfx::RectF& previous_bounds,
|
| // each other during that period of time.
|
| Range range(0.0f, kMaxTimeToVisibleInSeconds);
|
| IntersectPositiveHalfplane(
|
| - range, previous_bounds.x(), current_bounds.x(),
|
| + &range, previous_bounds.x(), current_bounds.x(),
|
| target_bounds.right(), time_delta);
|
| IntersectNegativeHalfplane(
|
| - range, previous_bounds.right(), current_bounds.right(),
|
| + &range, previous_bounds.right(), current_bounds.right(),
|
| target_bounds.x(), time_delta);
|
| IntersectPositiveHalfplane(
|
| - range, previous_bounds.y(), current_bounds.y(),
|
| + &range, previous_bounds.y(), current_bounds.y(),
|
| target_bounds.bottom(), time_delta);
|
| IntersectNegativeHalfplane(
|
| - range, previous_bounds.bottom(), current_bounds.bottom(),
|
| + &range, previous_bounds.bottom(), current_bounds.bottom(),
|
| target_bounds.y(), time_delta);
|
| return range.IsEmpty() ? kMaxTimeToVisibleInSeconds : range.start_;
|
| }
|
|
|