Commit 2b410551 authored by hendrikw's avatar hendrikw Committed by Commit bot

cc: Remove an unused constructor from TilePriority

Really minor cleanup, remove some unused code from the header.

Review URL: https://codereview.chromium.org/1132103008

Cr-Commit-Position: refs/heads/master@{#329759}
parent a0de0476
......@@ -51,41 +51,8 @@ struct CC_EXPORT TilePriority {
priority_bin(bin),
distance_to_visible(distance_to_visible) {}
TilePriority(const TilePriority& active, const TilePriority& pending) {
if (active.resolution == HIGH_RESOLUTION ||
pending.resolution == HIGH_RESOLUTION)
resolution = HIGH_RESOLUTION;
else if (active.resolution == LOW_RESOLUTION ||
pending.resolution == LOW_RESOLUTION)
resolution = LOW_RESOLUTION;
else
resolution = NON_IDEAL_RESOLUTION;
if (active.priority_bin < pending.priority_bin) {
priority_bin = active.priority_bin;
distance_to_visible = active.distance_to_visible;
} else if (active.priority_bin > pending.priority_bin) {
priority_bin = pending.priority_bin;
distance_to_visible = pending.distance_to_visible;
} else {
priority_bin = active.priority_bin;
distance_to_visible =
std::min(active.distance_to_visible, pending.distance_to_visible);
}
}
void AsValueInto(base::trace_event::TracedValue* dict) const;
bool operator ==(const TilePriority& other) const {
return resolution == other.resolution &&
priority_bin == other.priority_bin &&
distance_to_visible == other.distance_to_visible;
}
bool operator !=(const TilePriority& other) const {
return !(*this == other);
}
bool IsHigherPriorityThan(const TilePriority& other) const {
return priority_bin < other.priority_bin ||
(priority_bin == other.priority_bin &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment