Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: webkit/compositor_bindings/web_layer_tree_view_impl.cc

Issue 11783101: Make LayerTreeHost::animateLayers take a wall clock time in addition to a monotonic time (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698