OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/test/web_layer_tree_view_impl_for_testing.h" | 5 #include "content/test/web_layer_tree_view_impl_for_testing.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "cc/base/switches.h" | 10 #include "cc/base/switches.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 layer_tree_host_->SetPageScaleFactorAndLimits( | 109 layer_tree_host_->SetPageScaleFactorAndLimits( |
110 page_scale_factor, minimum, maximum); | 110 page_scale_factor, minimum, maximum); |
111 } | 111 } |
112 | 112 |
113 void WebLayerTreeViewImplForTesting::startPageScaleAnimation( | 113 void WebLayerTreeViewImplForTesting::startPageScaleAnimation( |
114 const blink::WebPoint& scroll, | 114 const blink::WebPoint& scroll, |
115 bool use_anchor, | 115 bool use_anchor, |
116 float new_page_scale, | 116 float new_page_scale, |
117 double duration_sec) {} | 117 double duration_sec) {} |
118 | 118 |
119 void WebLayerTreeViewImplForTesting::setNeedsAnimate() { | 119 void WebLayerTreeViewImplForTesting::setNeedsUpdateLayers() { |
120 layer_tree_host_->SetNeedsAnimate(); | 120 layer_tree_host_->SetNeedsUpdateLayers(); |
121 } | 121 } |
122 | 122 |
123 void WebLayerTreeViewImplForTesting::setNeedsRedraw() { | 123 void WebLayerTreeViewImplForTesting::setNeedsRedraw() { |
124 layer_tree_host_->SetNeedsRedraw(); | 124 layer_tree_host_->SetNeedsRedraw(); |
125 } | 125 } |
126 | 126 |
127 bool WebLayerTreeViewImplForTesting::commitRequested() const { | |
128 return layer_tree_host_->CommitRequested(); | |
129 } | |
130 | |
131 void WebLayerTreeViewImplForTesting::composite() { | 127 void WebLayerTreeViewImplForTesting::composite() { |
132 layer_tree_host_->Composite(gfx::FrameTime::Now()); | 128 layer_tree_host_->Composite(gfx::FrameTime::Now()); |
133 } | 129 } |
134 | 130 |
135 void WebLayerTreeViewImplForTesting::didStopFlinging() {} | 131 void WebLayerTreeViewImplForTesting::didStopFlinging() {} |
136 | 132 |
137 bool WebLayerTreeViewImplForTesting::compositeAndReadback( | 133 bool WebLayerTreeViewImplForTesting::compositeAndReadback( |
138 void* pixels, const WebRect& rect_in_device_viewport) { | 134 void* pixels, const WebRect& rect_in_device_viewport) { |
139 return layer_tree_host_->CompositeAndReadback(pixels, | 135 return layer_tree_host_->CompositeAndReadback(pixels, |
140 rect_in_device_viewport); | 136 rect_in_device_viewport); |
(...skipping 23 matching lines...) Expand all Loading... |
164 } | 160 } |
165 | 161 |
166 scoped_refptr<cc::ContextProvider> | 162 scoped_refptr<cc::ContextProvider> |
167 WebLayerTreeViewImplForTesting::OffscreenContextProvider() { | 163 WebLayerTreeViewImplForTesting::OffscreenContextProvider() { |
168 // Unit tests only run in single threaded mode. | 164 // Unit tests only run in single threaded mode. |
169 return webkit::gpu::TestContextProviderFactory::GetInstance()-> | 165 return webkit::gpu::TestContextProviderFactory::GetInstance()-> |
170 OffscreenContextProviderForMainThread(); | 166 OffscreenContextProviderForMainThread(); |
171 } | 167 } |
172 | 168 |
173 } // namespace webkit | 169 } // namespace webkit |
OLD | NEW |