| OLD | NEW |
| 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/layer_sorter.h" | 5 #include "cc/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> |
| 11 | 11 |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "cc/math_util.h" | 13 #include "cc/base/math_util.h" |
| 14 #include "cc/render_surface_impl.h" | 14 #include "cc/render_surface_impl.h" |
| 15 #include "ui/gfx/transform.h" | 15 #include "ui/gfx/transform.h" |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 | 18 |
| 19 // This epsilon is used to determine if two layers are too close to each other | 19 // This epsilon is used to determine if two layers are too close to each other |
| 20 // to be able to tell which is in front of the other. It's a relative epsilon | 20 // to be able to tell which is in front of the other. It's a relative epsilon |
| 21 // so it is robust to changes in scene scale. This value was chosen by picking | 21 // so it is robust to changes in scene scale. This value was chosen by picking |
| 22 // a value near machine epsilon and then increasing it until the flickering on | 22 // a value near machine epsilon and then increasing it until the flickering on |
| 23 // the test scene went away. | 23 // the test scene went away. |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 *it = sorted_list[count++]->layer; | 459 *it = sorted_list[count++]->layer; |
| 460 | 460 |
| 461 DVLOG(2) << "Sorting end ----"; | 461 DVLOG(2) << "Sorting end ----"; |
| 462 | 462 |
| 463 nodes_.clear(); | 463 nodes_.clear(); |
| 464 edges_.clear(); | 464 edges_.clear(); |
| 465 active_edges_.clear(); | 465 active_edges_.clear(); |
| 466 } | 466 } |
| 467 | 467 |
| 468 } // namespace cc | 468 } // namespace cc |
| OLD | NEW |