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

Unified Diff: cc/trees/layer_sorter.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/trees/layer_sorter.h ('k') | cc/trees/layer_sorter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_sorter.cc
diff --git a/cc/trees/layer_sorter.cc b/cc/trees/layer_sorter.cc
index bde49201f4e717c74e01808b677c37b005cafc4c..e171fe01120f6389931b1acb403581968e7126db 100644
--- a/cc/trees/layer_sorter.cc
+++ b/cc/trees/layer_sorter.cc
@@ -90,7 +90,7 @@ LayerSorter::ABCompareResult LayerSorter::CheckOverlap(LayerShape* a,
// Early out if the projected bounds don't overlap.
if (!a->projected_bounds.Intersects(b->projected_bounds))
- return NONE;
+ return None;
gfx::PointF aPoints[4] = { a->projected_quad.p1(),
a->projected_quad.p2(),
@@ -123,7 +123,7 @@ LayerSorter::ABCompareResult LayerSorter::CheckOverlap(LayerShape* a,
overlap_points.push_back(r);
if (overlap_points.empty())
- return NONE;
+ return None;
// Check the corresponding layer depth value for all overlap points to
// determine which layer is in front.
@@ -157,7 +157,7 @@ LayerSorter::ABCompareResult LayerSorter::CheckOverlap(LayerShape* a,
// If we can't tell which should come first, we use document order.
if (!accurate)
- return A_BEFORE_B;
+ return ABeforeB;
float max_diff =
std::abs(max_positive) > std::abs(max_negative) ?
@@ -176,9 +176,9 @@ LayerSorter::ABCompareResult LayerSorter::CheckOverlap(LayerShape* a,
// Maintain relative order if the layers have the same depth at all
// intersection points.
if (max_diff <= 0.f)
- return A_BEFORE_B;
+ return ABeforeB;
- return B_BEFORE_A;
+ return BBeforeA;
}
LayerShape::LayerShape() {}
@@ -320,10 +320,10 @@ void LayerSorter::CreateGraphEdges() {
&weight);
GraphNode* start_node = NULL;
GraphNode* end_node = NULL;
- if (overlap_result == A_BEFORE_B) {
+ if (overlap_result == ABeforeB) {
start_node = &node_a;
end_node = &node_b;
- } else if (overlap_result == B_BEFORE_A) {
+ } else if (overlap_result == BBeforeA) {
start_node = &node_b;
end_node = &node_a;
}
« no previous file with comments | « cc/trees/layer_sorter.h ('k') | cc/trees/layer_sorter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698