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

Unified Diff: Source/WebCore/platform/ClockGeneric.cpp

Issue 13454026: Update all float attributes in HTMLMediaElement and related objects to double (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed GTK change since the file is gone now. Created 7 years, 8 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: Source/WebCore/platform/ClockGeneric.cpp
diff --git a/Source/WebCore/platform/ClockGeneric.cpp b/Source/WebCore/platform/ClockGeneric.cpp
index ef09c4f3821f6ce36bfe2c8c57e509b76616e7d6..99aa3403c6268c92aeafb0bf0a87dcfc39043c50 100644
--- a/Source/WebCore/platform/ClockGeneric.cpp
+++ b/Source/WebCore/platform/ClockGeneric.cpp
@@ -26,7 +26,6 @@
#include "config.h"
#include "ClockGeneric.h"
-#include "FloatConversion.h"
#include <wtf/CurrentTime.h>
using namespace WebCore;
@@ -39,21 +38,20 @@ ClockGeneric::ClockGeneric()
m_startTime = m_lastTime = now();
}
-void ClockGeneric::setCurrentTime(float time)
+void ClockGeneric::setCurrentTime(double time)
{
m_startTime = m_lastTime = now();
m_offset = time;
}
-float ClockGeneric::currentTime() const
+double ClockGeneric::currentTime() const
{
if (m_running)
m_lastTime = now();
- float time = narrowPrecisionToFloat(((m_lastTime - m_startTime) * m_rate) + m_offset);
- return time;
+ return ((m_lastTime - m_startTime) * m_rate) + m_offset;
}
-void ClockGeneric::setPlayRate(float rate)
+void ClockGeneric::setPlayRate(double rate)
{
m_offset = now();
m_lastTime = m_startTime = now();
@@ -83,4 +81,3 @@ double ClockGeneric::now() const
{
return WTF::currentTime();
}
-

Powered by Google App Engine
This is Rietveld 408576698