OLD | NEW |
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/fake_layer_tree_host_impl.h" | 5 #include "cc/test/fake_layer_tree_host_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "cc/animation/animation_host.h" | 9 #include "cc/animation/animation_host.h" |
10 #include "cc/test/begin_frame_args_test.h" | 10 #include "cc/test/begin_frame_args_test.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 SetDebugState(LayerTreeDebugState()); | 56 SetDebugState(LayerTreeDebugState()); |
57 SetViewportSize(gfx::Size(100, 100)); | 57 SetViewportSize(gfx::Size(100, 100)); |
58 | 58 |
59 // Start an impl frame so tests have a valid frame_time to work with. | 59 // Start an impl frame so tests have a valid frame_time to work with. |
60 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1); | 60 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1); |
61 WillBeginImplFrame( | 61 WillBeginImplFrame( |
62 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks)); | 62 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks)); |
63 } | 63 } |
64 | 64 |
65 FakeLayerTreeHostImpl::~FakeLayerTreeHostImpl() { | 65 FakeLayerTreeHostImpl::~FakeLayerTreeHostImpl() { |
66 ReleaseOutputSurface(); | 66 ReleaseCompositorFrameSink(); |
67 } | 67 } |
68 | 68 |
69 void FakeLayerTreeHostImpl::CreatePendingTree() { | 69 void FakeLayerTreeHostImpl::CreatePendingTree() { |
70 LayerTreeHostImpl::CreatePendingTree(); | 70 LayerTreeHostImpl::CreatePendingTree(); |
71 float arbitrary_large_page_scale = 100000.f; | 71 float arbitrary_large_page_scale = 100000.f; |
72 pending_tree()->PushPageScaleFromMainThread( | 72 pending_tree()->PushPageScaleFromMainThread( |
73 1.f, 1.f / arbitrary_large_page_scale, arbitrary_large_page_scale); | 73 1.f, 1.f / arbitrary_large_page_scale, arbitrary_large_page_scale); |
74 } | 74 } |
75 | 75 |
76 void FakeLayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { | 76 void FakeLayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { |
(...skipping 29 matching lines...) Expand all Loading... |
106 | 106 |
107 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( | 107 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( |
108 LayerTreeImpl* layerTree) { | 108 LayerTreeImpl* layerTree) { |
109 RecursiveUpdateNumChildren(layerTree->root_layer_for_testing()); | 109 RecursiveUpdateNumChildren(layerTree->root_layer_for_testing()); |
110 bool update_lcd_text = false; | 110 bool update_lcd_text = false; |
111 layerTree->BuildLayerListAndPropertyTreesForTesting(); | 111 layerTree->BuildLayerListAndPropertyTreesForTesting(); |
112 layerTree->UpdateDrawProperties(update_lcd_text); | 112 layerTree->UpdateDrawProperties(update_lcd_text); |
113 } | 113 } |
114 | 114 |
115 } // namespace cc | 115 } // namespace cc |
OLD | NEW |