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

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

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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_picture_layer_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(Proxy* proxy,
13 SharedBitmapManager* manager) 13 SharedBitmapManager* manager,
14 TaskGraphRunner* task_graph_runner)
14 : LayerTreeHostImpl(LayerTreeSettings(), 15 : LayerTreeHostImpl(LayerTreeSettings(),
15 &client_, 16 &client_,
16 proxy, 17 proxy,
17 &stats_instrumentation_, 18 &stats_instrumentation_,
18 manager, 19 manager,
19 NULL, 20 NULL,
21 task_graph_runner,
20 0) { 22 0) {
21 // Explicitly clear all debug settings. 23 // Explicitly clear all debug settings.
22 SetDebugState(LayerTreeDebugState()); 24 SetDebugState(LayerTreeDebugState());
23 SetViewportSize(gfx::Size(100, 100)); 25 SetViewportSize(gfx::Size(100, 100));
24 26
25 // Avoid using Now() as the frame time in unit tests. 27 // Avoid using Now() as the frame time in unit tests.
26 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1); 28 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1);
27 SetCurrentBeginFrameArgs( 29 SetCurrentBeginFrameArgs(
28 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks)); 30 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks));
29 } 31 }
30 32
31 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(const LayerTreeSettings& settings, 33 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(const LayerTreeSettings& settings,
32 Proxy* proxy, 34 Proxy* proxy,
33 SharedBitmapManager* manager) 35 SharedBitmapManager* manager,
36 TaskGraphRunner* task_graph_runner)
34 : LayerTreeHostImpl(settings, 37 : LayerTreeHostImpl(settings,
35 &client_, 38 &client_,
36 proxy, 39 proxy,
37 &stats_instrumentation_, 40 &stats_instrumentation_,
38 manager, 41 manager,
39 NULL, 42 NULL,
43 task_graph_runner,
40 0) { 44 0) {
41 // Explicitly clear all debug settings. 45 // Explicitly clear all debug settings.
42 SetDebugState(LayerTreeDebugState()); 46 SetDebugState(LayerTreeDebugState());
43 47
44 // Avoid using Now() as the frame time in unit tests. 48 // Avoid using Now() as the frame time in unit tests.
45 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1); 49 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1);
46 SetCurrentBeginFrameArgs( 50 SetCurrentBeginFrameArgs(
47 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks)); 51 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks));
48 } 52 }
49 53
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 88 }
85 89
86 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( 90 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties(
87 LayerTreeImpl* layerTree) { 91 LayerTreeImpl* layerTree) {
88 RecursiveUpdateNumChildren(layerTree->root_layer()); 92 RecursiveUpdateNumChildren(layerTree->root_layer());
89 bool update_lcd_text = false; 93 bool update_lcd_text = false;
90 layerTree->UpdateDrawProperties(update_lcd_text); 94 layerTree->UpdateDrawProperties(update_lcd_text);
91 } 95 }
92 96
93 } // namespace cc 97 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.h ('k') | cc/test/fake_picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698