| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "base/containers/hash_tables.h" | 5 #include "base/containers/hash_tables.h" |
| 6 #include "cc/layers/append_quads_data.h" | 6 #include "cc/layers/append_quads_data.h" |
| 7 #include "cc/layers/nine_patch_layer_impl.h" | 7 #include "cc/layers/nine_patch_layer_impl.h" |
| 8 #include "cc/quads/texture_draw_quad.h" | 8 #include "cc/quads/texture_draw_quad.h" |
| 9 #include "cc/resources/ui_resource_bitmap.h" | 9 #include "cc/resources/ui_resource_bitmap.h" |
| 10 #include "cc/resources/ui_resource_client.h" | 10 #include "cc/resources/ui_resource_client.h" |
| 11 #include "cc/test/fake_impl_proxy.h" | 11 #include "cc/test/fake_impl_proxy.h" |
| 12 #include "cc/test/fake_ui_resource_layer_tree_host_impl.h" | 12 #include "cc/test/fake_ui_resource_layer_tree_host_impl.h" |
| 13 #include "cc/test/geometry_test_utils.h" | 13 #include "cc/test/geometry_test_utils.h" |
| 14 #include "cc/test/layer_test_common.h" | 14 #include "cc/test/layer_test_common.h" |
| 15 #include "cc/trees/single_thread_proxy.h" | 15 #include "cc/trees/single_thread_proxy.h" |
| 16 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "ui/gfx/rect_conversions.h" | 18 #include "ui/gfx/geometry/rect_conversions.h" |
| 19 #include "ui/gfx/safe_integer_conversions.h" | 19 #include "ui/gfx/geometry/safe_integer_conversions.h" |
| 20 #include "ui/gfx/transform.h" | 20 #include "ui/gfx/transform.h" |
| 21 | 21 |
| 22 namespace cc { | 22 namespace cc { |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 gfx::Rect ToRoundedIntRect(const gfx::RectF& rect_f) { | 25 gfx::Rect ToRoundedIntRect(const gfx::RectF& rect_f) { |
| 26 return gfx::Rect(gfx::ToRoundedInt(rect_f.x()), | 26 return gfx::Rect(gfx::ToRoundedInt(rect_f.x()), |
| 27 gfx::ToRoundedInt(rect_f.y()), | 27 gfx::ToRoundedInt(rect_f.y()), |
| 28 gfx::ToRoundedInt(rect_f.width()), | 28 gfx::ToRoundedInt(rect_f.width()), |
| 29 gfx::ToRoundedInt(rect_f.height())); | 29 gfx::ToRoundedInt(rect_f.height())); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 impl.quad_list(), occluded, &partially_occluded_count); | 266 impl.quad_list(), occluded, &partially_occluded_count); |
| 267 // The layer outputs nine quads, three of which are partially occluded, and | 267 // The layer outputs nine quads, three of which are partially occluded, and |
| 268 // three fully occluded. | 268 // three fully occluded. |
| 269 EXPECT_EQ(6u, impl.quad_list().size()); | 269 EXPECT_EQ(6u, impl.quad_list().size()); |
| 270 EXPECT_EQ(3u, partially_occluded_count); | 270 EXPECT_EQ(3u, partially_occluded_count); |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 | 273 |
| 274 } // namespace | 274 } // namespace |
| 275 } // namespace cc | 275 } // namespace cc |
| OLD | NEW |