Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 1688563002: cc :: Move some tracking of layer_property_changed to main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698