Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2719)

Unified Diff: cc/resources/tile_priority.cc

Issue 13051003: cpplint.py pass on cc/(base|debug|quads|resources)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix prioritized_resource_unittest Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/tile_priority.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
}
« no previous file with comments | « cc/resources/tile_priority.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698