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

Unified Diff: sky/engine/core/dom/ScriptedAnimationController.cpp

Issue 880473003: sky-scrollable should use a reasonable fling curve (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Now with heights Created 5 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/dom/ScriptedAnimationController.cpp
diff --git a/sky/engine/core/dom/ScriptedAnimationController.cpp b/sky/engine/core/dom/ScriptedAnimationController.cpp
index 25e975fda6d31e6e72eca5764b72eb696cfa79f5..a41f20bdc3471deac7b94f18151af839ef50d62d 100644
--- a/sky/engine/core/dom/ScriptedAnimationController.cpp
+++ b/sky/engine/core/dom/ScriptedAnimationController.cpp
@@ -130,8 +130,7 @@ void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow)
if (!m_document)
return;
- double highResNowMs = 1000.0 * m_document->timing()->monotonicTimeToZeroBasedDocumentTime(monotonicTimeNow);
- double legacyHighResNowMs = 1000.0 * m_document->timing()->monotonicTimeToPseudoWallTime(monotonicTimeNow);
+ double highResNowMs = 1000.0 * monotonicTimeNow;
// First, generate a list of callbacks to consider. Callbacks registered from this point
// on are considered only for the "next" frame, not this one.
@@ -140,14 +139,8 @@ void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow)
for (size_t i = 0; i < m_callbacksToInvoke.size(); ++i) {
RequestAnimationFrameCallback* callback = m_callbacksToInvoke[i].get();
- if (!callback->m_cancelled) {
- TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "FireAnimationFrame", "data", InspectorAnimationFrameEvent::data(m_document, callback->m_id));
- if (callback->m_useLegacyTimeBase)
- callback->handleEvent(legacyHighResNowMs);
- else
- callback->handleEvent(highResNowMs);
- TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", TRACE_EVENT_SCOPE_PROCESS, "data", InspectorUpdateCountersEvent::data());
- }
+ if (!callback->m_cancelled)
+ callback->handleEvent(highResNowMs);
}
m_callbacksToInvoke.clear();

Powered by Google App Engine
This is Rietveld 408576698