| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 double duration_sec) {} | 113 double duration_sec) {} |
| 114 | 114 |
| 115 void WebLayerTreeViewImplForTesting::setNeedsAnimate() { | 115 void WebLayerTreeViewImplForTesting::setNeedsAnimate() { |
| 116 layer_tree_host_->SetNeedsAnimate(); | 116 layer_tree_host_->SetNeedsAnimate(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 bool WebLayerTreeViewImplForTesting::commitRequested() const { | 119 bool WebLayerTreeViewImplForTesting::commitRequested() const { |
| 120 return layer_tree_host_->CommitRequested(); | 120 return layer_tree_host_->CommitRequested(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void WebLayerTreeViewImplForTesting::composite() { | |
| 124 layer_tree_host_->Composite(gfx::FrameTime::Now()); | |
| 125 } | |
| 126 | |
| 127 void WebLayerTreeViewImplForTesting::didStopFlinging() {} | 123 void WebLayerTreeViewImplForTesting::didStopFlinging() {} |
| 128 | 124 |
| 129 bool WebLayerTreeViewImplForTesting::compositeAndReadback( | 125 bool WebLayerTreeViewImplForTesting::compositeAndReadback( |
| 130 void* pixels, const WebRect& rect_in_device_viewport) { | 126 void* pixels, const WebRect& rect_in_device_viewport) { |
| 131 return layer_tree_host_->CompositeAndReadback(pixels, | 127 return layer_tree_host_->CompositeAndReadback(pixels, |
| 132 rect_in_device_viewport); | 128 rect_in_device_viewport); |
| 133 } | 129 } |
| 134 | 130 |
| 135 void WebLayerTreeViewImplForTesting::finishAllRendering() { | 131 void WebLayerTreeViewImplForTesting::finishAllRendering() { |
| 136 layer_tree_host_->FinishAllRendering(); | 132 layer_tree_host_->FinishAllRendering(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 : NULL); | 170 : NULL); |
| 175 } | 171 } |
| 176 | 172 |
| 177 void WebLayerTreeViewImplForTesting::clearViewportLayers() { | 173 void WebLayerTreeViewImplForTesting::clearViewportLayers() { |
| 178 layer_tree_host_->RegisterViewportLayers(scoped_refptr<cc::Layer>(), | 174 layer_tree_host_->RegisterViewportLayers(scoped_refptr<cc::Layer>(), |
| 179 scoped_refptr<cc::Layer>(), | 175 scoped_refptr<cc::Layer>(), |
| 180 scoped_refptr<cc::Layer>()); | 176 scoped_refptr<cc::Layer>()); |
| 181 } | 177 } |
| 182 | 178 |
| 183 } // namespace webkit | 179 } // namespace webkit |
| OLD | NEW |