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

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

Issue 1411663002: cc: Split Proxy to eliminate unnecessary dependencies on the impl side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update perf tests. Created 5 years, 2 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/test/fake_layer_tree_host_impl.h ('k') | cc/test/fake_ui_resource_layer_tree_host_impl.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/begin_frame_args_test.h" 5 #include "cc/test/begin_frame_args_test.h"
6 #include "cc/test/fake_layer_tree_host_impl.h" 6 #include "cc/test/fake_layer_tree_host_impl.h"
7 #include "cc/test/test_shared_bitmap_manager.h" 7 #include "cc/test/test_shared_bitmap_manager.h"
8 #include "cc/trees/layer_tree_impl.h" 8 #include "cc/trees/layer_tree_impl.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(Proxy* proxy, 12 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(
13 SharedBitmapManager* manager, 13 TaskRunnerProvider* task_runner_provider,
14 TaskGraphRunner* task_graph_runner) 14 SharedBitmapManager* manager,
15 TaskGraphRunner* task_graph_runner)
15 : FakeLayerTreeHostImpl(LayerTreeSettings(), 16 : FakeLayerTreeHostImpl(LayerTreeSettings(),
16 proxy, 17 task_runner_provider,
17 manager,
18 task_graph_runner,
19 nullptr) {}
20
21 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(const LayerTreeSettings& settings,
22 Proxy* proxy,
23 SharedBitmapManager* manager,
24 TaskGraphRunner* task_graph_runner)
25 : FakeLayerTreeHostImpl(settings,
26 proxy,
27 manager, 18 manager,
28 task_graph_runner, 19 task_graph_runner,
29 nullptr) {} 20 nullptr) {}
30 21
31 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl( 22 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(
32 const LayerTreeSettings& settings, 23 const LayerTreeSettings& settings,
33 Proxy* proxy, 24 TaskRunnerProvider* task_runner_provider,
25 SharedBitmapManager* manager,
26 TaskGraphRunner* task_graph_runner)
27 : FakeLayerTreeHostImpl(settings,
28 task_runner_provider,
29 manager,
30 task_graph_runner,
31 nullptr) {}
32
33 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(
34 const LayerTreeSettings& settings,
35 TaskRunnerProvider* task_runner_provider,
34 SharedBitmapManager* manager, 36 SharedBitmapManager* manager,
35 TaskGraphRunner* task_graph_runner, 37 TaskGraphRunner* task_graph_runner,
36 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) 38 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager)
37 : LayerTreeHostImpl(settings, 39 : LayerTreeHostImpl(settings,
38 &client_, 40 &client_,
39 proxy, 41 task_runner_provider,
40 &stats_instrumentation_, 42 &stats_instrumentation_,
41 manager, 43 manager,
42 gpu_memory_buffer_manager, 44 gpu_memory_buffer_manager,
43 task_graph_runner, 45 task_graph_runner,
44 0) { 46 0) {
45 // Explicitly clear all debug settings. 47 // Explicitly clear all debug settings.
46 SetDebugState(LayerTreeDebugState()); 48 SetDebugState(LayerTreeDebugState());
47 SetViewportSize(gfx::Size(100, 100)); 49 SetViewportSize(gfx::Size(100, 100));
48 50
49 // Start an impl frame so tests have a valid frame_time to work with. 51 // Start an impl frame so tests have a valid frame_time to work with.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 92
91 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( 93 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties(
92 LayerTreeImpl* layerTree) { 94 LayerTreeImpl* layerTree) {
93 RecursiveUpdateNumChildren(layerTree->root_layer()); 95 RecursiveUpdateNumChildren(layerTree->root_layer());
94 bool update_lcd_text = false; 96 bool update_lcd_text = false;
95 layerTree->BuildPropertyTreesForTesting(); 97 layerTree->BuildPropertyTreesForTesting();
96 layerTree->UpdateDrawProperties(update_lcd_text); 98 layerTree->UpdateDrawProperties(update_lcd_text);
97 } 99 }
98 100
99 } // namespace cc 101 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.h ('k') | cc/test/fake_ui_resource_layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698