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 // Renamed. Staged for removal. |
119 void WebLayerTreeViewImplForTesting::setNeedsAnimate() { | 120 void WebLayerTreeViewImplForTesting::setNeedsAnimate() { |
120 layer_tree_host_->SetNeedsAnimate(); | 121 setNeedsUpdateLayers(); |
121 } | 122 } |
122 | 123 |
| 124 void WebLayerTreeViewImplForTesting::setNeedsUpdateLayers() { |
| 125 layer_tree_host_->SetNeedsUpdateLayers(); |
| 126 } |
| 127 |
| 128 // Unused. Staged for removal. |
123 bool WebLayerTreeViewImplForTesting::commitRequested() const { | 129 bool WebLayerTreeViewImplForTesting::commitRequested() const { |
124 return layer_tree_host_->CommitRequested(); | 130 NOTREACHED(); |
| 131 return false; |
125 } | 132 } |
126 | 133 |
127 void WebLayerTreeViewImplForTesting::composite() { | 134 void WebLayerTreeViewImplForTesting::composite() { |
128 layer_tree_host_->Composite(gfx::FrameTime::Now()); | 135 layer_tree_host_->Composite(gfx::FrameTime::Now()); |
129 } | 136 } |
130 | 137 |
131 void WebLayerTreeViewImplForTesting::didStopFlinging() {} | 138 void WebLayerTreeViewImplForTesting::didStopFlinging() {} |
132 | 139 |
133 bool WebLayerTreeViewImplForTesting::compositeAndReadback( | 140 bool WebLayerTreeViewImplForTesting::compositeAndReadback( |
134 void* pixels, const WebRect& rect_in_device_viewport) { | 141 void* pixels, const WebRect& rect_in_device_viewport) { |
(...skipping 25 matching lines...) Expand all Loading... |
160 } | 167 } |
161 | 168 |
162 scoped_refptr<cc::ContextProvider> | 169 scoped_refptr<cc::ContextProvider> |
163 WebLayerTreeViewImplForTesting::OffscreenContextProvider() { | 170 WebLayerTreeViewImplForTesting::OffscreenContextProvider() { |
164 // Unit tests only run in single threaded mode. | 171 // Unit tests only run in single threaded mode. |
165 return webkit::gpu::TestContextProviderFactory::GetInstance()-> | 172 return webkit::gpu::TestContextProviderFactory::GetInstance()-> |
166 OffscreenContextProviderForMainThread(); | 173 OffscreenContextProviderForMainThread(); |
167 } | 174 } |
168 | 175 |
169 } // namespace webkit | 176 } // namespace webkit |
OLD | NEW |