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

Unified Diff: cc/trees/layer_tree_host_perftest.cc

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r248052. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_perftest.cc
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc
index 1bfe1c49d9e3ba36a7071bb6b457a17bf15fa1dc..16b801d013882ae9e8912a45691b6e9170b1cb1d 100644
--- a/cc/trees/layer_tree_host_perftest.cc
+++ b/cc/trees/layer_tree_host_perftest.cc
@@ -338,6 +338,21 @@ class PageScaleImplSidePaintingPerfTest
layer_tree_host()->SetPageScaleFactorAndLimits(1.f, min_scale_, max_scale_);
}
+ virtual void BuildTree() OVERRIDE {
+ LayerTreeHostPerfTestJsonReader::BuildTree();
+
+ // TODO(wjmaclean) The JSON tree reader should be able to mark inner/out
+ // viewport scroll layers as part of its tree setup. The code below is
+ // matched to the tree specified in the data file heavy_layer_tree.
+ Layer* root = layer_tree_host()->root_layer();
+ Layer* clip_layer = root->children()[0];
+ Layer* inner_viewport_scroll_layer = clip_layer->children()[0];
+ inner_viewport_scroll_layer->SetScrollClipLayerId(root->id());
+ inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true);
+ layer_tree_host()->RegisterViewportLayers(
+ root, inner_viewport_scroll_layer, 0);
+ }
+
virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta,
float scale_delta) OVERRIDE {
float page_scale_factor = layer_tree_host()->page_scale_factor();
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698