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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2853 // No layers need commit. | 2853 // No layers need commit. |
2854 break; | 2854 break; |
2855 case 11: | 2855 case 11: |
2856 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.8f, 1.1f); | 2856 layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.8f, 1.1f); |
2857 // No layers need commit. | 2857 // No layers need commit. |
2858 break; | 2858 break; |
2859 case 12: | 2859 case 12: |
2860 child_->MakePushProperties(); | 2860 child_->MakePushProperties(); |
2861 // The modified layer needs commit | 2861 // The modified layer needs commit |
2862 ++expected_push_properties_child_; | 2862 ++expected_push_properties_child_; |
| 2863 ++expected_push_properties_grandchild_; |
2863 break; | 2864 break; |
2864 case 13: | 2865 case 13: |
2865 child2_->MakePushProperties(); | 2866 child2_->MakePushProperties(); |
2866 // The modified layer needs commit | 2867 // The modified layer needs commit |
2867 ++expected_push_properties_child2_; | 2868 ++expected_push_properties_child2_; |
2868 break; | 2869 break; |
2869 case 14: | 2870 case 14: |
2870 child_->RemoveFromParent(); | 2871 child_->RemoveFromParent(); |
2871 root_->AddChild(child_); | 2872 root_->AddChild(child_); |
2872 // Layers added to the tree get committed. | 2873 // Layers added to the tree get committed. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3012 ++expected_push_properties_grandchild_impl_; | 3013 ++expected_push_properties_grandchild_impl_; |
3013 break; | 3014 break; |
3014 case 11: | 3015 case 11: |
3015 // The leaf that always pushes is pushed. | 3016 // The leaf that always pushes is pushed. |
3016 ++expected_push_properties_grandchild_impl_; | 3017 ++expected_push_properties_grandchild_impl_; |
3017 break; | 3018 break; |
3018 case 12: | 3019 case 12: |
3019 // The leaf that always pushes is pushed. | 3020 // The leaf that always pushes is pushed. |
3020 ++expected_push_properties_grandchild_impl_; | 3021 ++expected_push_properties_grandchild_impl_; |
3021 | 3022 |
3022 // This child position was changed. | 3023 // This child position was changed. So the subtree needs to push |
| 3024 // properties. |
3023 ++expected_push_properties_child2_impl_; | 3025 ++expected_push_properties_child2_impl_; |
| 3026 ++expected_push_properties_grandchild2_impl_; |
3024 break; | 3027 break; |
3025 case 13: | 3028 case 13: |
3026 // The position of this child was changed. | 3029 // The position of this child was changed. |
3027 ++expected_push_properties_child_impl_; | 3030 ++expected_push_properties_child_impl_; |
3028 | 3031 |
3029 // The leaf that always pushes is pushed. | 3032 // The leaf that always pushes is pushed. |
3030 ++expected_push_properties_grandchild_impl_; | 3033 ++expected_push_properties_grandchild_impl_; |
3031 break; | 3034 break; |
3032 case 14: | 3035 case 14: |
3033 // Second child is removed from tree. Don't discard counts because | 3036 // Second child is removed from tree. Don't discard counts because |
(...skipping 3570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6604 EndTest(); | 6607 EndTest(); |
6605 } | 6608 } |
6606 | 6609 |
6607 void AfterTest() override {} | 6610 void AfterTest() override {} |
6608 }; | 6611 }; |
6609 | 6612 |
6610 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); | 6613 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); |
6611 | 6614 |
6612 } // namespace | 6615 } // namespace |
6613 } // namespace cc | 6616 } // namespace cc |
OLD | NEW |