| 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "cc/animation/timing_function.h" | 10 #include "cc/animation/timing_function.h" |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 | 690 |
| 691 // Positions remain in layout pixels. | 691 // Positions remain in layout pixels. |
| 692 EXPECT_EQ(gfx::Point(0, 0), root->position()); | 692 EXPECT_EQ(gfx::Point(0, 0), root->position()); |
| 693 EXPECT_EQ(gfx::Point(2, 2), child->position()); | 693 EXPECT_EQ(gfx::Point(2, 2), child->position()); |
| 694 | 694 |
| 695 // Compute all the layer transforms for the frame. | 695 // Compute all the layer transforms for the frame. |
| 696 LayerTreeHostImpl::FrameData frame_data; | 696 LayerTreeHostImpl::FrameData frame_data; |
| 697 impl->PrepareToDraw(&frame_data); | 697 impl->PrepareToDraw(&frame_data); |
| 698 impl->DidDrawAllLayers(frame_data); | 698 impl->DidDrawAllLayers(frame_data); |
| 699 | 699 |
| 700 const LayerTreeHostImpl::LayerList& render_surface_layer_list = | 700 const LayerImplList& render_surface_layer_list = |
| 701 *frame_data.render_surface_layer_list; | 701 *frame_data.render_surface_layer_list; |
| 702 | 702 |
| 703 // Both layers should be drawing into the root render surface. | 703 // Both layers should be drawing into the root render surface. |
| 704 ASSERT_EQ(1u, render_surface_layer_list.size()); | 704 ASSERT_EQ(1u, render_surface_layer_list.size()); |
| 705 ASSERT_EQ(root->render_surface(), | 705 ASSERT_EQ(root->render_surface(), |
| 706 render_surface_layer_list[0]->render_surface()); | 706 render_surface_layer_list[0]->render_surface()); |
| 707 ASSERT_EQ(2u, root->render_surface()->layer_list().size()); | 707 ASSERT_EQ(2u, root->render_surface()->layer_list().size()); |
| 708 | 708 |
| 709 // The root render surface is the size of the viewport. | 709 // The root render surface is the size of the viewport. |
| 710 EXPECT_RECT_EQ(gfx::Rect(0, 0, 60, 60), | 710 EXPECT_RECT_EQ(gfx::Rect(0, 0, 60, 60), |
| (...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2172 } | 2172 } |
| 2173 | 2173 |
| 2174 private: | 2174 private: |
| 2175 base::TimeTicks frame_time_; | 2175 base::TimeTicks frame_time_; |
| 2176 }; | 2176 }; |
| 2177 | 2177 |
| 2178 MULTI_THREAD_TEST_F(LayerTreeHostTestVSyncNotification); | 2178 MULTI_THREAD_TEST_F(LayerTreeHostTestVSyncNotification); |
| 2179 | 2179 |
| 2180 } // namespace | 2180 } // namespace |
| 2181 } // namespace cc | 2181 } // namespace cc |
| OLD | NEW |