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

Side by Side Diff: cc/test/layer_tree_test.cc

Issue 2840143002: [cc] Change semantics of fixed-pos container layer
Patch Set: add back inner viewport container layer as fixed-pos container Created 3 years, 7 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/layers/layer_position_constraint_unittest.cc ('k') | cc/trees/layer_tree_host.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/test/layer_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 inner_viewport_scroll_layer->SetScrollClipLayerId( 59 inner_viewport_scroll_layer->SetScrollClipLayerId(
60 inner_viewport_container_layer->id()); 60 inner_viewport_container_layer->id());
61 outer_scroll_layer->SetScrollClipLayerId( 61 outer_scroll_layer->SetScrollClipLayerId(
62 outer_viewport_container_layer->id()); 62 outer_viewport_container_layer->id());
63 63
64 inner_viewport_container_layer->SetBounds(inner_bounds); 64 inner_viewport_container_layer->SetBounds(inner_bounds);
65 inner_viewport_scroll_layer->SetBounds(outer_bounds); 65 inner_viewport_scroll_layer->SetBounds(outer_bounds);
66 outer_viewport_container_layer->SetBounds(outer_bounds); 66 outer_viewport_container_layer->SetBounds(outer_bounds);
67 67
68 inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true); 68 outer_viewport_container_layer->SetIsContainerForFixedPositionLayers(true);
bokan 2017/05/09 22:27:21 If we're going to keep the inner viewport as a con
69 outer_scroll_layer->SetIsContainerForFixedPositionLayers(true);
70 host->RegisterViewportLayers(overscroll_elasticity_layer, page_scale_layer, 69 host->RegisterViewportLayers(overscroll_elasticity_layer, page_scale_layer,
71 inner_viewport_scroll_layer, outer_scroll_layer); 70 inner_viewport_scroll_layer, outer_scroll_layer);
72 } 71 }
73 72
74 void CreateVirtualViewportLayers(Layer* root_layer, 73 void CreateVirtualViewportLayers(Layer* root_layer,
75 const gfx::Size& inner_bounds, 74 const gfx::Size& inner_bounds,
76 const gfx::Size& outer_bounds, 75 const gfx::Size& outer_bounds,
77 const gfx::Size& scroll_bounds, 76 const gfx::Size& scroll_bounds,
78 LayerTreeHost* host) { 77 LayerTreeHost* host) {
79 scoped_refptr<Layer> outer_viewport_scroll_layer = Layer::Create(); 78 scoped_refptr<Layer> outer_viewport_scroll_layer = Layer::Create();
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 DCHECK(task_runner_provider()->IsMainThread() || 896 DCHECK(task_runner_provider()->IsMainThread() ||
898 task_runner_provider()->IsMainThreadBlocked()); 897 task_runner_provider()->IsMainThreadBlocked());
899 return layer_tree_host_.get(); 898 return layer_tree_host_.get();
900 } 899 }
901 900
902 Proxy* LayerTreeTest::proxy() { 901 Proxy* LayerTreeTest::proxy() {
903 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; 902 return layer_tree_host() ? layer_tree_host()->proxy() : NULL;
904 } 903 }
905 904
906 } // namespace cc 905 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_position_constraint_unittest.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698