Chromium Code Reviews| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 bool WebLayerTreeViewImpl::commitRequested() const | 143 bool WebLayerTreeViewImpl::commitRequested() const |
| 144 { | 144 { |
| 145 return m_layerTreeHost->commitRequested(); | 145 return m_layerTreeHost->commitRequested(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void WebLayerTreeViewImpl::composite() | 148 void WebLayerTreeViewImpl::composite() |
| 149 { | 149 { |
| 150 m_layerTreeHost->composite(); | 150 m_layerTreeHost->composite(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 // TODO(ajuma): Remove this after the WebKit patch to use the 2-argument version lands. | |
| 153 void WebLayerTreeViewImpl::updateAnimations(double frameBeginTimeSeconds) | 154 void WebLayerTreeViewImpl::updateAnimations(double frameBeginTimeSeconds) |
| 154 { | 155 { |
| 155 base::TimeTicks frameBeginTime = base::TimeTicks::FromInternalValue(frameBeg inTimeSeconds * base::Time::kMicrosecondsPerSecond); | 156 base::TimeTicks frameBeginTime = base::TimeTicks::FromInternalValue(frameBeg inTimeSeconds * base::Time::kMicrosecondsPerSecond); |
| 156 m_layerTreeHost->updateAnimations(frameBeginTime); | 157 m_layerTreeHost->updateAnimations(frameBeginTime, base::Time::Now()); |
| 158 } | |
| 159 | |
| 160 void WebLayerTreeViewImpl::updateAnimations(double monotonicFrameBeginTimeSecond s, double wallClockFrameBeginTimeSeconds) | |
| 161 { | |
| 162 base::TimeTicks monotonicFrameBeginTime = base::TimeTicks::FromInternalValue (monotonicFrameBeginTimeSeconds * base::Time::kMicrosecondsPerSecond); | |
| 163 base::Time wallClockFrameBeginTime = base::Time::FromInternalValue(wallClock FrameBeginTimeSeconds* base::Time::kMicrosecondsPerSecond); | |
|
Ian Vollick
2013/01/15 03:27:37
It looks like Time has a ::FromDoubleT method that
ajuma
2013/01/15 16:24:08
Done.
| |
| 164 m_layerTreeHost->updateAnimations(monotonicFrameBeginTime, wallClockFrameBeg inTime); | |
| 157 } | 165 } |
| 158 | 166 |
| 159 void WebLayerTreeViewImpl::didStopFlinging() | 167 void WebLayerTreeViewImpl::didStopFlinging() |
| 160 { | 168 { |
| 161 m_layerTreeHost->didStopFlinging(); | 169 m_layerTreeHost->didStopFlinging(); |
| 162 } | 170 } |
| 163 | 171 |
| 164 bool WebLayerTreeViewImpl::compositeAndReadback(void *pixels, const WebRect& rec t) | 172 bool WebLayerTreeViewImpl::compositeAndReadback(void *pixels, const WebRect& rec t) |
| 165 { | 173 { |
| 166 return m_layerTreeHost->compositeAndReadback(pixels, rect); | 174 return m_layerTreeHost->compositeAndReadback(pixels, rect); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 282 { | 290 { |
| 283 m_client->didCompleteSwapBuffers(); | 291 m_client->didCompleteSwapBuffers(); |
| 284 } | 292 } |
| 285 | 293 |
| 286 void WebLayerTreeViewImpl::scheduleComposite() | 294 void WebLayerTreeViewImpl::scheduleComposite() |
| 287 { | 295 { |
| 288 m_client->scheduleComposite(); | 296 m_client->scheduleComposite(); |
| 289 } | 297 } |
| 290 | 298 |
| 291 } // namespace WebKit | 299 } // namespace WebKit |
| OLD | NEW |