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

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

Issue 2417783005: [Master/Overview CL] Make PageScaleFactor work for oopif subframe.
Patch Set: Rebase to master@{#429656}. Created 4 years, 1 month 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/test/fake_layer_tree_host_impl.cc ('k') | cc/trees/layer_tree.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/test_layer_tree_host_base.h" 5 #include "cc/test/test_layer_tree_host_base.h"
6 6
7 #include "cc/test/fake_compositor_frame_sink.h" 7 #include "cc/test/fake_compositor_frame_sink.h"
8 #include "cc/test/fake_raster_source.h" 8 #include "cc/test/fake_raster_source.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void TestLayerTreeHostBase::SetupPendingTree( 90 void TestLayerTreeHostBase::SetupPendingTree(
91 scoped_refptr<RasterSource> raster_source) { 91 scoped_refptr<RasterSource> raster_source) {
92 SetupPendingTree(std::move(raster_source), gfx::Size(), Region()); 92 SetupPendingTree(std::move(raster_source), gfx::Size(), Region());
93 } 93 }
94 94
95 void TestLayerTreeHostBase::SetupPendingTree( 95 void TestLayerTreeHostBase::SetupPendingTree(
96 scoped_refptr<RasterSource> raster_source, 96 scoped_refptr<RasterSource> raster_source,
97 const gfx::Size& tile_size, 97 const gfx::Size& tile_size,
98 const Region& invalidation) { 98 const Region& invalidation) {
99 host_impl()->CreatePendingTree(); 99 host_impl()->CreatePendingTree();
100 host_impl()->pending_tree()->PushPageScaleFromMainThread(1.f, 0.00001f, 100 host_impl()->pending_tree()->PushPageScaleFromMainThread(1.f, 1.f, 0.00001f,
101 100000.f); 101 100000.f);
102 LayerTreeImpl* pending_tree = host_impl()->pending_tree(); 102 LayerTreeImpl* pending_tree = host_impl()->pending_tree();
103 pending_tree->SetDeviceScaleFactor( 103 pending_tree->SetDeviceScaleFactor(
104 host_impl()->active_tree()->device_scale_factor()); 104 host_impl()->active_tree()->device_scale_factor());
105 105
106 // Steal from the recycled tree if possible. 106 // Steal from the recycled tree if possible.
107 LayerImpl* pending_root = pending_tree->root_layer_for_testing(); 107 LayerImpl* pending_root = pending_tree->root_layer_for_testing();
108 std::unique_ptr<FakePictureLayerImpl> pending_layer; 108 std::unique_ptr<FakePictureLayerImpl> pending_layer;
109 DCHECK(!pending_root || pending_root->id() == root_id_); 109 DCHECK(!pending_root || pending_root->id() == root_id_);
110 if (!pending_root) { 110 if (!pending_root) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2; 171 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes * 2;
172 state.memory_limit_policy = ALLOW_ANYTHING; 172 state.memory_limit_policy = ALLOW_ANYTHING;
173 state.tree_priority = SAME_PRIORITY_FOR_BOTH_TREES; 173 state.tree_priority = SAME_PRIORITY_FOR_BOTH_TREES;
174 174
175 host_impl_->resource_pool()->SetResourceUsageLimits( 175 host_impl_->resource_pool()->SetResourceUsageLimits(
176 state.soft_memory_limit_in_bytes, state.num_resources_limit); 176 state.soft_memory_limit_in_bytes, state.num_resources_limit);
177 host_impl_->tile_manager()->SetGlobalStateForTesting(state); 177 host_impl_->tile_manager()->SetGlobalStateForTesting(state);
178 } 178 }
179 179
180 } // namespace cc 180 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.cc ('k') | cc/trees/layer_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698