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_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 6660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6671 LayerTreeHostImpl::FrameData frame; | 6671 LayerTreeHostImpl::FrameData frame; |
6672 EXPECT_EQ(DRAW_SUCCESS, PrepareToDrawFrame(&frame)); | 6672 EXPECT_EQ(DRAW_SUCCESS, PrepareToDrawFrame(&frame)); |
6673 host_impl_->DrawLayers(&frame); | 6673 host_impl_->DrawLayers(&frame); |
6674 host_impl_->DidDrawAllLayers(frame); | 6674 host_impl_->DidDrawAllLayers(frame); |
6675 } | 6675 } |
6676 Mock::VerifyAndClearExpectations(&mock_context); | 6676 Mock::VerifyAndClearExpectations(&mock_context); |
6677 | 6677 |
6678 // Without partial swap, but a layer does clip its subtree, one scissor is | 6678 // Without partial swap, but a layer does clip its subtree, one scissor is |
6679 // set. | 6679 // set. |
6680 host_impl_->active_tree()->root_layer()->SetMasksToBounds(true); | 6680 host_impl_->active_tree()->root_layer()->SetMasksToBounds(true); |
| 6681 host_impl_->active_tree()->root_layer()->NoteLayerPropertyChanged(); |
6681 harness.MustDrawSolidQuad(); | 6682 harness.MustDrawSolidQuad(); |
6682 harness.MustSetScissor(0, 0, 10, 10); | 6683 harness.MustSetScissor(0, 0, 10, 10); |
6683 { | 6684 { |
6684 LayerTreeHostImpl::FrameData frame; | 6685 LayerTreeHostImpl::FrameData frame; |
6685 EXPECT_EQ(DRAW_SUCCESS, PrepareToDrawFrame(&frame)); | 6686 EXPECT_EQ(DRAW_SUCCESS, PrepareToDrawFrame(&frame)); |
6686 host_impl_->DrawLayers(&frame); | 6687 host_impl_->DrawLayers(&frame); |
6687 host_impl_->DidDrawAllLayers(frame); | 6688 host_impl_->DidDrawAllLayers(frame); |
6688 } | 6689 } |
6689 Mock::VerifyAndClearExpectations(&mock_context); | 6690 Mock::VerifyAndClearExpectations(&mock_context); |
6690 } | 6691 } |
(...skipping 3272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9963 // There should not be any jitter measured till we hit the fixed point hits | 9964 // There should not be any jitter measured till we hit the fixed point hits |
9964 // threshold. | 9965 // threshold. |
9965 float expected_jitter = | 9966 float expected_jitter = |
9966 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; | 9967 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; |
9967 EXPECT_EQ(jitter, expected_jitter); | 9968 EXPECT_EQ(jitter, expected_jitter); |
9968 } | 9969 } |
9969 } | 9970 } |
9970 | 9971 |
9971 } // namespace | 9972 } // namespace |
9972 } // namespace cc | 9973 } // namespace cc |
OLD | NEW |