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

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

Issue 1014993002: [exp] cc: Introduce cc::CompositorMutator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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
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 : LayerTreeHostImpl(LayerTreeSettings(), 14 : LayerTreeHostImpl(LayerTreeSettings(),
15 &client_, 15 &client_,
16 proxy, 16 proxy,
17 &stats_instrumentation_, 17 &stats_instrumentation_,
18 manager, 18 manager,
19 NULL, 19 NULL,
20 NULL,
20 0) { 21 0) {
21 // Explicitly clear all debug settings. 22 // Explicitly clear all debug settings.
22 SetDebugState(LayerTreeDebugState()); 23 SetDebugState(LayerTreeDebugState());
23 SetViewportSize(gfx::Size(100, 100)); 24 SetViewportSize(gfx::Size(100, 100));
24 25
25 // Avoid using Now() as the frame time in unit tests. 26 // Avoid using Now() as the frame time in unit tests.
26 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1); 27 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1);
27 SetCurrentBeginFrameArgs( 28 SetCurrentBeginFrameArgs(
28 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks)); 29 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks));
29 } 30 }
30 31
31 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(const LayerTreeSettings& settings, 32 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(const LayerTreeSettings& settings,
32 Proxy* proxy, 33 Proxy* proxy,
33 SharedBitmapManager* manager) 34 SharedBitmapManager* manager)
34 : LayerTreeHostImpl(settings, 35 : LayerTreeHostImpl(settings,
35 &client_, 36 &client_,
36 proxy, 37 proxy,
37 &stats_instrumentation_, 38 &stats_instrumentation_,
38 manager, 39 manager,
39 NULL, 40 NULL,
41 NULL,
40 0) { 42 0) {
41 // Explicitly clear all debug settings. 43 // Explicitly clear all debug settings.
42 SetDebugState(LayerTreeDebugState()); 44 SetDebugState(LayerTreeDebugState());
43 45
44 // Avoid using Now() as the frame time in unit tests. 46 // Avoid using Now() as the frame time in unit tests.
45 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1); 47 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1);
46 SetCurrentBeginFrameArgs( 48 SetCurrentBeginFrameArgs(
47 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks)); 49 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks));
48 } 50 }
49 51
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 86 }
85 87
86 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( 88 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties(
87 LayerTreeImpl* layerTree) { 89 LayerTreeImpl* layerTree) {
88 RecursiveUpdateNumChildren(layerTree->root_layer()); 90 RecursiveUpdateNumChildren(layerTree->root_layer());
89 bool update_lcd_text = false; 91 bool update_lcd_text = false;
90 layerTree->UpdateDrawProperties(update_lcd_text); 92 layerTree->UpdateDrawProperties(update_lcd_text);
91 } 93 }
92 94
93 } // namespace cc 95 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698