OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 3951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3962 EXPECT_LT(priority_for_tree_priority.priority_bin, | 3962 EXPECT_LT(priority_for_tree_priority.priority_bin, |
3963 priority.priority_bin); | 3963 priority.priority_bin); |
3964 EXPECT_EQ(priority_for_tree_priority.priority_bin, | 3964 EXPECT_EQ(priority_for_tree_priority.priority_bin, |
3965 twin_priority.priority_bin); | 3965 twin_priority.priority_bin); |
3966 EXPECT_TRUE(priority_for_tree_priority.priority_bin < | 3966 EXPECT_TRUE(priority_for_tree_priority.priority_bin < |
3967 priority.priority_bin); | 3967 priority.priority_bin); |
3968 } else if (tile->is_occluded(tree) != | 3968 } else if (tile->is_occluded(tree) != |
3969 tile->is_occluded(twin_tree)) { | 3969 tile->is_occluded(twin_tree)) { |
3970 EXPECT_TRUE(tile->is_occluded(tree)); | 3970 EXPECT_TRUE(tile->is_occluded(tree)); |
3971 EXPECT_FALSE(tile->is_occluded(twin_tree)); | 3971 EXPECT_FALSE(tile->is_occluded(twin_tree)); |
3972 EXPECT_FALSE( | 3972 EXPECT_FALSE(tile->is_occluded_combined()); |
3973 tile->is_occluded_for_tree_priority(tree_priority)); | |
3974 } else if (priority.distance_to_visible != | 3973 } else if (priority.distance_to_visible != |
3975 twin_priority.distance_to_visible) { | 3974 twin_priority.distance_to_visible) { |
3976 EXPECT_LT(priority_for_tree_priority.distance_to_visible, | 3975 EXPECT_LT(priority_for_tree_priority.distance_to_visible, |
3977 priority.distance_to_visible); | 3976 priority.distance_to_visible); |
3978 EXPECT_EQ(priority_for_tree_priority.distance_to_visible, | 3977 EXPECT_EQ(priority_for_tree_priority.distance_to_visible, |
3979 twin_priority.distance_to_visible); | 3978 twin_priority.distance_to_visible); |
3980 EXPECT_TRUE(priority_for_tree_priority.distance_to_visible < | 3979 EXPECT_TRUE(priority_for_tree_priority.distance_to_visible < |
3981 priority.distance_to_visible); | 3980 priority.distance_to_visible); |
3982 } else { | 3981 } else { |
3983 // Shared tiles having the same active and pending priorities | 3982 // Shared tiles having the same active and pending priorities |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4934 result = layer->CalculateTileSize(gfx::Size(447, 400)); | 4933 result = layer->CalculateTileSize(gfx::Size(447, 400)); |
4935 EXPECT_EQ(result.width(), 448); | 4934 EXPECT_EQ(result.width(), 448); |
4936 EXPECT_EQ(result.height(), 448); | 4935 EXPECT_EQ(result.height(), 448); |
4937 result = layer->CalculateTileSize(gfx::Size(500, 499)); | 4936 result = layer->CalculateTileSize(gfx::Size(500, 499)); |
4938 EXPECT_EQ(result.width(), 512); | 4937 EXPECT_EQ(result.width(), 512); |
4939 EXPECT_EQ(result.height(), 500 + 2); | 4938 EXPECT_EQ(result.height(), 500 + 2); |
4940 } | 4939 } |
4941 | 4940 |
4942 } // namespace | 4941 } // namespace |
4943 } // namespace cc | 4942 } // namespace cc |
OLD | NEW |