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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // Explicitly clear all debug settings. | 55 // Explicitly clear all debug settings. |
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(); |
| 67 } |
66 | 68 |
67 void FakeLayerTreeHostImpl::CreatePendingTree() { | 69 void FakeLayerTreeHostImpl::CreatePendingTree() { |
68 LayerTreeHostImpl::CreatePendingTree(); | 70 LayerTreeHostImpl::CreatePendingTree(); |
69 float arbitrary_large_page_scale = 100000.f; | 71 float arbitrary_large_page_scale = 100000.f; |
70 pending_tree()->PushPageScaleFromMainThread( | 72 pending_tree()->PushPageScaleFromMainThread( |
71 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); |
72 } | 74 } |
73 | 75 |
74 void FakeLayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { | 76 void FakeLayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { |
75 LayerTreeHostImpl::NotifyTileStateChanged(tile); | 77 LayerTreeHostImpl::NotifyTileStateChanged(tile); |
(...skipping 28 matching lines...) Expand all Loading... |
104 | 106 |
105 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( | 107 void FakeLayerTreeHostImpl::UpdateNumChildrenAndDrawProperties( |
106 LayerTreeImpl* layerTree) { | 108 LayerTreeImpl* layerTree) { |
107 RecursiveUpdateNumChildren(layerTree->root_layer_for_testing()); | 109 RecursiveUpdateNumChildren(layerTree->root_layer_for_testing()); |
108 bool update_lcd_text = false; | 110 bool update_lcd_text = false; |
109 layerTree->BuildLayerListAndPropertyTreesForTesting(); | 111 layerTree->BuildLayerListAndPropertyTreesForTesting(); |
110 layerTree->UpdateDrawProperties(update_lcd_text); | 112 layerTree->UpdateDrawProperties(update_lcd_text); |
111 } | 113 } |
112 | 114 |
113 } // namespace cc | 115 } // namespace cc |
OLD | NEW |