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

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

Issue 1882413006: cc: Construct the RSLL without using layer hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 8 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_common.cc ('k') | cc/trees/layer_tree_impl.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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 scroll->SetBounds(scroll_content_size); 958 scroll->SetBounds(scroll_content_size);
959 scroll->SetScrollClipLayer(clip->id()); 959 scroll->SetScrollClipLayer(clip->id());
960 scroll->SetDrawsContent(true); 960 scroll->SetDrawsContent(true);
961 961
962 std::unique_ptr<SolidColorScrollbarLayerImpl> scrollbar = 962 std::unique_ptr<SolidColorScrollbarLayerImpl> scrollbar =
963 SolidColorScrollbarLayerImpl::Create(layer_tree_impl, 4, VERTICAL, 10, 0, 963 SolidColorScrollbarLayerImpl::Create(layer_tree_impl, 4, VERTICAL, 10, 0,
964 false, true); 964 false, true);
965 scrollbar->SetBounds(scrollbar_size); 965 scrollbar->SetBounds(scrollbar_size);
966 scrollbar->SetPosition(gfx::PointF(345, 0)); 966 scrollbar->SetPosition(gfx::PointF(345, 0));
967 scrollbar->SetScrollLayerId(scroll->id()); 967 scrollbar->SetScrollLayerId(scroll->id());
968 scrollbar->set_layer_or_descendant_is_drawn(true);
969 scrollbar->SetDrawsContent(true); 968 scrollbar->SetDrawsContent(true);
969 scrollbar->SetOpacity(1.f);
970 970
971 std::unique_ptr<LayerImpl> squash1 = LayerImpl::Create(layer_tree_impl, 5); 971 std::unique_ptr<LayerImpl> squash1 = LayerImpl::Create(layer_tree_impl, 5);
972 squash1->SetBounds(gfx::Size(140, 300)); 972 squash1->SetBounds(gfx::Size(140, 300));
973 squash1->SetPosition(gfx::PointF(220, 0)); 973 squash1->SetPosition(gfx::PointF(220, 0));
974 squash1->SetDrawsContent(true); 974 squash1->SetDrawsContent(true);
975 975
976 std::unique_ptr<LayerImpl> squash2 = LayerImpl::Create(layer_tree_impl, 6); 976 std::unique_ptr<LayerImpl> squash2 = LayerImpl::Create(layer_tree_impl, 6);
977 squash2->SetBounds(gfx::Size(140, 300)); 977 squash2->SetBounds(gfx::Size(140, 300));
978 squash2->SetPosition(gfx::PointF(220, 300)); 978 squash2->SetPosition(gfx::PointF(220, 300));
979 squash2->SetDrawsContent(true); 979 squash2->SetDrawsContent(true);
(...skipping 9693 matching lines...) Expand 10 before | Expand all | Expand 10 after
10673 // There should not be any jitter measured till we hit the fixed point hits 10673 // There should not be any jitter measured till we hit the fixed point hits
10674 // threshold. 10674 // threshold.
10675 float expected_jitter = 10675 float expected_jitter =
10676 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; 10676 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0;
10677 EXPECT_EQ(jitter, expected_jitter); 10677 EXPECT_EQ(jitter, expected_jitter);
10678 } 10678 }
10679 } 10679 }
10680 10680
10681 } // namespace 10681 } // namespace
10682 } // namespace cc 10682 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698