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_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "cc/animation/keyframed_animation_curve.h" | 10 #include "cc/animation/keyframed_animation_curve.h" |
(...skipping 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2587 SetLayerPropertiesForTesting(occluding_child.get(), identity_matrix, | 2587 SetLayerPropertiesForTesting(occluding_child.get(), identity_matrix, |
2588 gfx::Point3F(), gfx::PointF(), | 2588 gfx::Point3F(), gfx::PointF(), |
2589 gfx::Size(200, 200), false, false, false); | 2589 gfx::Size(200, 200), false, false, false); |
2590 | 2590 |
2591 host_impl.SetViewportSize(root->bounds()); | 2591 host_impl.SetViewportSize(root->bounds()); |
2592 | 2592 |
2593 child->AddChild(grand_child.Pass()); | 2593 child->AddChild(grand_child.Pass()); |
2594 root->AddChild(child.Pass()); | 2594 root->AddChild(child.Pass()); |
2595 root->AddChild(occluding_child.Pass()); | 2595 root->AddChild(occluding_child.Pass()); |
2596 host_impl.active_tree()->SetRootLayer(root.Pass()); | 2596 host_impl.active_tree()->SetRootLayer(root.Pass()); |
| 2597 host_impl.SetVisible(true); |
2597 host_impl.InitializeRenderer(output_surface.get()); | 2598 host_impl.InitializeRenderer(output_surface.get()); |
2598 bool update_lcd_text = false; | 2599 bool update_lcd_text = false; |
2599 host_impl.active_tree()->UpdateDrawProperties(update_lcd_text); | 2600 host_impl.active_tree()->UpdateDrawProperties(update_lcd_text); |
2600 | 2601 |
2601 LayerImpl* grand_child_ptr = | 2602 LayerImpl* grand_child_ptr = |
2602 host_impl.active_tree()->root_layer()->children()[0]->children()[0]; | 2603 host_impl.active_tree()->root_layer()->children()[0]->children()[0]; |
2603 | 2604 |
2604 // Though all layers have invertible transforms, matrix multiplication using | 2605 // Though all layers have invertible transforms, matrix multiplication using |
2605 // floating-point math makes the draw transform uninvertible. | 2606 // floating-point math makes the draw transform uninvertible. |
2606 EXPECT_FALSE(grand_child_ptr->draw_transform().IsInvertible()); | 2607 EXPECT_FALSE(grand_child_ptr->draw_transform().IsInvertible()); |
(...skipping 5351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7958 SetLayerPropertiesForTesting(clip_child, identity_matrix, gfx::Point3F(), | 7959 SetLayerPropertiesForTesting(clip_child, identity_matrix, gfx::Point3F(), |
7959 gfx::PointF(), gfx::Size(30, 30), true, false, | 7960 gfx::PointF(), gfx::Size(30, 30), true, false, |
7960 false); | 7961 false); |
7961 ExecuteCalculateDrawProperties(root); | 7962 ExecuteCalculateDrawProperties(root); |
7962 | 7963 |
7963 EXPECT_EQ(gfx::Rect(-10, -10, 30, 30), render_surface2->clip_rect()); | 7964 EXPECT_EQ(gfx::Rect(-10, -10, 30, 30), render_surface2->clip_rect()); |
7964 } | 7965 } |
7965 | 7966 |
7966 } // namespace | 7967 } // namespace |
7967 } // namespace cc | 7968 } // namespace cc |
OLD | NEW |