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

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

Issue 1365793003: cc: Re-enable disabled tile manager unittests (plus fixes) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update 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/tiles/tile_manager_unittest.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 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(Proxy* proxy,
13 SharedBitmapManager* manager, 13 SharedBitmapManager* manager,
14 TaskGraphRunner* task_graph_runner) 14 TaskGraphRunner* task_graph_runner)
15 : LayerTreeHostImpl(LayerTreeSettings(), 15 : FakeLayerTreeHostImpl(LayerTreeSettings(),
16 &client_, 16 proxy,
17 proxy, 17 manager,
18 &stats_instrumentation_, 18 task_graph_runner,
19 manager, 19 nullptr) {}
20 NULL,
21 task_graph_runner,
22 0) {
23 // Explicitly clear all debug settings.
24 SetDebugState(LayerTreeDebugState());
25 SetViewportSize(gfx::Size(100, 100));
danakj 2015/09/28 21:28:47 Huh, no tests depended on this?
vmpstr 2015/09/28 21:36:43 Oops, I missed that. I thought the code was all th
26
27 // Start an impl frame so tests have a valid frame_time to work with.
28 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1);
29 WillBeginImplFrame(
30 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks));
31 }
32 20
33 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(const LayerTreeSettings& settings, 21 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(const LayerTreeSettings& settings,
34 Proxy* proxy, 22 Proxy* proxy,
35 SharedBitmapManager* manager, 23 SharedBitmapManager* manager,
36 TaskGraphRunner* task_graph_runner) 24 TaskGraphRunner* task_graph_runner)
25 : FakeLayerTreeHostImpl(settings,
26 proxy,
27 manager,
28 task_graph_runner,
29 nullptr) {}
30
31 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(
32 const LayerTreeSettings& settings,
33 Proxy* proxy,
34 SharedBitmapManager* manager,
35 TaskGraphRunner* task_graph_runner,
36 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager)
37 : LayerTreeHostImpl(settings, 37 : LayerTreeHostImpl(settings,
38 &client_, 38 &client_,
39 proxy, 39 proxy,
40 &stats_instrumentation_, 40 &stats_instrumentation_,
41 manager, 41 manager,
42 NULL, 42 gpu_memory_buffer_manager,
43 task_graph_runner, 43 task_graph_runner,
44 0) { 44 0) {
45 // Explicitly clear all debug settings. 45 // Explicitly clear all debug settings.
46 SetDebugState(LayerTreeDebugState()); 46 SetDebugState(LayerTreeDebugState());
47 47
48 // Start an impl frame so tests have a valid frame_time to work with. 48 // Start an impl frame so tests have a valid frame_time to work with.
49 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1); 49 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1);
50 WillBeginImplFrame( 50 WillBeginImplFrame(
51 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks)); 51 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks));
52 } 52 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( 90 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties(
91 LayerTreeImpl* layerTree) { 91 LayerTreeImpl* layerTree) {
92 RecursiveUpdateNumChildren(layerTree->root_layer()); 92 RecursiveUpdateNumChildren(layerTree->root_layer());
93 bool update_lcd_text = false; 93 bool update_lcd_text = false;
94 layerTree->BuildPropertyTreesForTesting(); 94 layerTree->BuildPropertyTreesForTesting();
95 layerTree->UpdateDrawProperties(update_lcd_text); 95 layerTree->UpdateDrawProperties(update_lcd_text);
96 } 96 }
97 97
98 } // namespace cc 98 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.h ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698