| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "web_layer_tree_view_impl.h" | 5 #include "web_layer_tree_view_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "cc/font_atlas.h" | 8 #include "cc/font_atlas.h" |
| 9 #include "cc/input_handler.h" | 9 #include "cc/input_handler.h" |
| 10 #include "cc/layer.h" | 10 #include "cc/layer.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 bool WebLayerTreeViewImpl::commitRequested() const | 144 bool WebLayerTreeViewImpl::commitRequested() const |
| 145 { | 145 { |
| 146 return m_layerTreeHost->commitRequested(); | 146 return m_layerTreeHost->commitRequested(); |
| 147 } | 147 } |
| 148 | 148 |
| 149 void WebLayerTreeViewImpl::composite() | 149 void WebLayerTreeViewImpl::composite() |
| 150 { | 150 { |
| 151 m_layerTreeHost->composite(); | 151 m_layerTreeHost->composite(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 // TODO(ajuma): Remove this after WebKit bug 106594 (which switches to using the
2-argument version) lands. |
| 154 void WebLayerTreeViewImpl::updateAnimations(double frameBeginTimeSeconds) | 155 void WebLayerTreeViewImpl::updateAnimations(double frameBeginTimeSeconds) |
| 155 { | 156 { |
| 156 base::TimeTicks frameBeginTime = base::TimeTicks::FromInternalValue(frameBeg
inTimeSeconds * base::Time::kMicrosecondsPerSecond); | 157 base::TimeTicks frameBeginTime = base::TimeTicks::FromInternalValue(frameBeg
inTimeSeconds * base::Time::kMicrosecondsPerSecond); |
| 157 m_layerTreeHost->updateAnimations(frameBeginTime); | 158 m_layerTreeHost->updateAnimations(frameBeginTime, base::Time::Now()); |
| 159 } |
| 160 |
| 161 void WebLayerTreeViewImpl::updateAnimations(double monotonicFrameBeginTimeSecond
s, double wallClockFrameBeginTimeSeconds) |
| 162 { |
| 163 base::TimeTicks monotonicFrameBeginTime = base::TimeTicks::FromInternalValue
(monotonicFrameBeginTimeSeconds * base::Time::kMicrosecondsPerSecond); |
| 164 base::Time wallClockFrameBeginTime = base::Time::FromDoubleT(wallClockFrameB
eginTimeSeconds); |
| 165 m_layerTreeHost->updateAnimations(monotonicFrameBeginTime, wallClockFrameBeg
inTime); |
| 158 } | 166 } |
| 159 | 167 |
| 160 void WebLayerTreeViewImpl::didStopFlinging() | 168 void WebLayerTreeViewImpl::didStopFlinging() |
| 161 { | 169 { |
| 162 m_layerTreeHost->didStopFlinging(); | 170 m_layerTreeHost->didStopFlinging(); |
| 163 } | 171 } |
| 164 | 172 |
| 165 bool WebLayerTreeViewImpl::compositeAndReadback(void *pixels, const WebRect& rec
t) | 173 bool WebLayerTreeViewImpl::compositeAndReadback(void *pixels, const WebRect& rec
t) |
| 166 { | 174 { |
| 167 return m_layerTreeHost->compositeAndReadback(pixels, rect); | 175 return m_layerTreeHost->compositeAndReadback(pixels, rect); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 { | 291 { |
| 284 m_client->didCompleteSwapBuffers(); | 292 m_client->didCompleteSwapBuffers(); |
| 285 } | 293 } |
| 286 | 294 |
| 287 void WebLayerTreeViewImpl::scheduleComposite() | 295 void WebLayerTreeViewImpl::scheduleComposite() |
| 288 { | 296 { |
| 289 m_client->scheduleComposite(); | 297 m_client->scheduleComposite(); |
| 290 } | 298 } |
| 291 | 299 |
| 292 } // namespace WebKit | 300 } // namespace WebKit |
| OLD | NEW |