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

Side by Side Diff: trunk/src/cc/trees/layer_sorter.cc

Issue 13316003: Revert 191364 "cc: Add ‘chromium_code’: 1 to cc.gyp and cc_t..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/cc/scheduler/vsync_time_source.cc ('k') | trunk/src/cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_sorter.h" 5 #include "cc/trees/layer_sorter.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <limits> 9 #include <limits>
10 #include <vector> 10 #include <vector>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 : layer(layer_impl), 63 : layer(layer_impl),
64 incoming_edge_weight(0.f) {} 64 incoming_edge_weight(0.f) {}
65 65
66 GraphNode::~GraphNode() {} 66 GraphNode::~GraphNode() {}
67 67
68 LayerSorter::LayerSorter() 68 LayerSorter::LayerSorter()
69 : z_range_(0.f) {} 69 : z_range_(0.f) {}
70 70
71 LayerSorter::~LayerSorter() {} 71 LayerSorter::~LayerSorter() {}
72 72
73 static float CheckFloatingPointNumericAccuracy(float a, float b) { 73 static float const CheckFloatingPointNumericAccuracy(float a, float b) {
74 float abs_dif = std::abs(b - a); 74 float abs_dif = std::abs(b - a);
75 float abs_max = std::max(std::abs(b), std::abs(a)); 75 float abs_max = std::max(std::abs(b), std::abs(a));
76 // Check to see if we've got a result with a reasonable amount of error. 76 // Check to see if we've got a result with a reasonable amount of error.
77 return abs_dif / abs_max; 77 return abs_dif / abs_max;
78 } 78 }
79 79
80 // Checks whether layer "a" draws on top of layer "b". The weight value returned 80 // Checks whether layer "a" draws on top of layer "b". The weight value returned
81 // is an indication of the maximum z-depth difference between the layers or zero 81 // is an indication of the maximum z-depth difference between the layers or zero
82 // if the layers are found to be intesecting (some features are in front and 82 // if the layers are found to be intesecting (some features are in front and
83 // some are behind). 83 // some are behind).
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 *it = sorted_list[count++]->layer; 458 *it = sorted_list[count++]->layer;
459 459
460 DVLOG(2) << "Sorting end ----"; 460 DVLOG(2) << "Sorting end ----";
461 461
462 nodes_.clear(); 462 nodes_.clear();
463 edges_.clear(); 463 edges_.clear();
464 active_edges_.clear(); 464 active_edges_.clear();
465 } 465 }
466 466
467 } // namespace cc 467 } // namespace cc
OLDNEW
« no previous file with comments | « trunk/src/cc/scheduler/vsync_time_source.cc ('k') | trunk/src/cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698