Title: [99488] trunk/Source/WebCore
Revision
99488
Author
[email protected]
Date
2011-11-07 15:17:42 -0800 (Mon, 07 Nov 2011)

Log Message

Rename PlatformClockPOSIX -> ClockGeneric, and use WTF::currentTime() for its timing source.
https://bugs.webkit.org/show_bug.cgi?id=71702

Reviewed by Sam Weinig.

No new tests; covered by existing tests.

* platform/Clock.cpp:
(Clock::create):
* platform/ClockGeneric.cpp: Renamed from Source/WebCore/platform/posix/PlatformClockPOSIX.cpp.
(ClockGeneric::GenericClock):
(ClockGeneric::setCurrentTime):
(ClockGeneric::currentTime):
(ClockGeneric::setPlayRate):
(ClockGeneric::start):
(ClockGeneric::stop):
* platform/ClockGeneric.h: Renamed from Source/WebCore/platform/posix/PlatformClockPOSIX.h.
(WebCore::ClockGeneric::playRate):
(WebCore::ClockGeneric::isRunning):

Boilerplate project file changes:
* CMakeLists.txt:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (99487 => 99488)


--- trunk/Source/WebCore/CMakeLists.txt	2011-11-07 23:16:47 UTC (rev 99487)
+++ trunk/Source/WebCore/CMakeLists.txt	2011-11-07 23:17:42 UTC (rev 99488)
@@ -1022,6 +1022,7 @@
     page/animation/KeyframeAnimation.cpp
 
     platform/Arena.cpp
+    platform/Clock.cpp
     platform/ContextMenu.cpp
     platform/ContextMenuItem.cpp
     platform/ContentType.cpp
@@ -1033,6 +1034,7 @@
     platform/FileChooser.cpp
     platform/FileIconLoader.cpp
     platform/FileSystem.cpp
+    platform/ClockGeneric.cpp
     platform/GeolocationService.cpp
     platform/KURL.cpp
     platform/KillRingNone.cpp

Modified: trunk/Source/WebCore/ChangeLog (99487 => 99488)


--- trunk/Source/WebCore/ChangeLog	2011-11-07 23:16:47 UTC (rev 99487)
+++ trunk/Source/WebCore/ChangeLog	2011-11-07 23:17:42 UTC (rev 99488)
@@ -1,3 +1,31 @@
+2011-11-07  Jer Noble  <[email protected]>
+
+        Rename PlatformClockPOSIX -> ClockGeneric, and use WTF::currentTime() for its timing source.
+        https://bugs.webkit.org/show_bug.cgi?id=71702
+
+        Reviewed by Sam Weinig.
+
+        No new tests; covered by existing tests.
+
+        * platform/Clock.cpp:
+        (Clock::create):
+        * platform/ClockGeneric.cpp: Renamed from Source/WebCore/platform/posix/PlatformClockPOSIX.cpp.
+        (ClockGeneric::GenericClock):
+        (ClockGeneric::setCurrentTime):
+        (ClockGeneric::currentTime):
+        (ClockGeneric::setPlayRate):
+        (ClockGeneric::start):
+        (ClockGeneric::stop):
+        * platform/ClockGeneric.h: Renamed from Source/WebCore/platform/posix/PlatformClockPOSIX.h.
+        (WebCore::ClockGeneric::playRate):
+        (WebCore::ClockGeneric::isRunning):
+
+        Boilerplate project file changes:
+        * CMakeLists.txt:
+        * Target.pri:
+        * WebCore.gypi:
+        * WebCore.xcodeproj/project.pbxproj:
+
 2011-11-07  Vangelis Kokkevis  <[email protected]>
 
         Create a separate setting for compositing of for scrollable [i]frames

Modified: trunk/Source/WebCore/Target.pri (99487 => 99488)


--- trunk/Source/WebCore/Target.pri	2011-11-07 23:16:47 UTC (rev 99487)
+++ trunk/Source/WebCore/Target.pri	2011-11-07 23:17:42 UTC (rev 99488)
@@ -1032,6 +1032,7 @@
     platform/FileIconLoader.cpp \
     platform/FileStream.cpp \
     platform/FileSystem.cpp \
+    platform/ClockGeneric.cpp \
     platform/GeolocationService.cpp \
     platform/image-decoders/qt/ImageFrameQt.cpp \
     platform/graphics/FontDescription.cpp \
@@ -2070,6 +2071,7 @@
     platform/mock/GeolocationServiceMock.h \
     platform/mock/SpeechInputClientMock.h \
     platform/mock/ScrollbarThemeMock.h \
+    platform/ClockGeneric.h \
     platform/graphics/BitmapImage.h \
     platform/graphics/Color.h \
     platform/graphics/filters/FEBlend.h \

Modified: trunk/Source/WebCore/WebCore.gypi (99487 => 99488)


--- trunk/Source/WebCore/WebCore.gypi	2011-11-07 23:16:47 UTC (rev 99487)
+++ trunk/Source/WebCore/WebCore.gypi	2011-11-07 23:17:42 UTC (rev 99488)
@@ -658,6 +658,7 @@
             'page/animation/AnimationController.h',
             'page/mac/WebCoreFrameView.h',
             'platform/AsyncFileStream.h',
+            'platform/Clock.h',
             'platform/ContextMenu.h',
             'platform/ContextMenuItem.h',
             'platform/Cookie.h',
@@ -3044,6 +3045,8 @@
             'platform/AsyncFileSystem.h',
             'platform/AsyncFileSystemCallbacks.h',
             'platform/AutodrainedPool.h',
+            'platform/Clock.cpp',
+            'platform/Clock.h',
             'platform/ContentType.cpp',
             'platform/ContentType.h',
             'platform/ContextMenu.cpp',
@@ -3063,6 +3066,8 @@
             'platform/FileStream.cpp',
             'platform/FileSystem.cpp',
             'platform/FloatConversion.h',
+            'platform/ClockGeneric.cpp',
+            'platform/ClockGeneric.h',
             'platform/GeolocationService.cpp',
             'platform/GeolocationService.h',
             'platform/HashTools.h',
@@ -4066,6 +4071,7 @@
             'platform/mac/MIMETypeRegistryMac.mm',
             'platform/mac/PasteboardHelper.h',
             'platform/mac/PasteboardMac.mm',
+            'platform/mac/PlatformClockCA.cpp',
             'platform/mac/PlatformMouseEventMac.mm',
             'platform/mac/PlatformScreenMac.mm',
             'platform/mac/PopupMenuMac.mm',

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (99487 => 99488)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2011-11-07 23:16:47 UTC (rev 99487)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2011-11-07 23:17:42 UTC (rev 99488)
@@ -5715,7 +5715,7 @@
 		CD8203101395ACE700F956C6 /* WebWindowAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = CD82030E1395ACE700F956C6 /* WebWindowAnimation.h */; };
 		CD8203111395ACE700F956C6 /* WebWindowAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD82030F1395ACE700F956C6 /* WebWindowAnimation.mm */; };
 		CDEA763014608A53008B31F1 /* PlatformClockCA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */; };
-		CDEA76341460B56F008B31F1 /* PlatformClockPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA76321460AE29008B31F1 /* PlatformClockPOSIX.cpp */; };
+		CDEA76341460B56F008B31F1 /* ClockGeneric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA76321460AE29008B31F1 /* GenericClock.cpp */; };
 		CDEA76351460B71A008B31F1 /* Clock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA76331460B462008B31F1 /* Clock.cpp */; };
 		CDEA7C841276230400B846DD /* RenderFullScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = CDEA7C821276230400B846DD /* RenderFullScreen.h */; };
 		CDEA7C851276230400B846DD /* RenderFullScreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA7C831276230400B846DD /* RenderFullScreen.cpp */; };
@@ -13025,8 +13025,8 @@
 		CDEA762C14608224008B31F1 /* Clock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Clock.h; sourceTree = "<group>"; };
 		CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformClockCA.cpp; sourceTree = "<group>"; };
 		CDEA762F146084EE008B31F1 /* PlatformClockCA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformClockCA.h; sourceTree = "<group>"; };
-		CDEA76311460AE1B008B31F1 /* PlatformClockPOSIX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformClockPOSIX.h; sourceTree = "<group>"; };
-		CDEA76321460AE29008B31F1 /* PlatformClockPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformClockPOSIX.cpp; sourceTree = "<group>"; };
+		CDEA76311460AE1B008B31F1 /* ClockGeneric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericClock.h; sourceTree = "<group>"; };
+		CDEA76321460AE29008B31F1 /* ClockGeneric.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GenericClock.cpp; sourceTree = "<group>"; };
 		CDEA76331460B462008B31F1 /* Clock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Clock.cpp; sourceTree = "<group>"; };
 		CDEA7C821276230400B846DD /* RenderFullScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderFullScreen.h; sourceTree = "<group>"; };
 		CDEA7C831276230400B846DD /* RenderFullScreen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderFullScreen.cpp; sourceTree = "<group>"; };
@@ -15064,8 +15064,6 @@
 			isa = PBXGroup;
 			children = (
 				5160300A0CC4251200C8AC25 /* FileSystemPOSIX.cpp */,
-				CDEA76311460AE1B008B31F1 /* PlatformClockPOSIX.h */,
-				CDEA76321460AE29008B31F1 /* PlatformClockPOSIX.cpp */,
 			);
 			path = posix;
 			sourceTree = "<group>";
@@ -20106,6 +20104,8 @@
 				E1E1BEFF115FF6FB006F52CA /* WindowsKeyboardCodes.h */,
 				CDEA762C14608224008B31F1 /* Clock.h */,
 				CDEA76331460B462008B31F1 /* Clock.cpp */,
+				CDEA76311460AE1B008B31F1 /* ClockGeneric.h */,
+				CDEA76321460AE29008B31F1 /* ClockGeneric.cpp */,
 			);
 			path = platform;
 			sourceTree = "<group>";
@@ -27482,7 +27482,7 @@
 				2D8FEBDC143E3EF70072502B /* CSSCrossfadeValue.cpp in Sources */,
 				CAE9F90F146441F000C245B0 /* CSSAspectRatioValue.cpp in Sources */,
 				CDEA763014608A53008B31F1 /* PlatformClockCA.cpp in Sources */,
-				CDEA76341460B56F008B31F1 /* PlatformClockPOSIX.cpp in Sources */,
+				CDEA76341460B56F008B31F1 /* ClockGeneric.cpp in Sources */,
 				CDEA76351460B71A008B31F1 /* Clock.cpp in Sources */,
 				976F36EA14686225005E93B4 /* SecurityContext.cpp in Sources */,
 			);

Modified: trunk/Source/WebCore/platform/Clock.cpp (99487 => 99488)


--- trunk/Source/WebCore/platform/Clock.cpp	2011-11-07 23:16:47 UTC (rev 99487)
+++ trunk/Source/WebCore/platform/Clock.cpp	2011-11-07 23:17:42 UTC (rev 99488)
@@ -29,7 +29,7 @@
 #if USE(COREAUDIO)
     #include "PlatformClockCA.h"
 #else
-    #include "PlatformClockPOSIX.h"
+    #include "ClockGeneric.h"
 #endif
 
 using namespace WebCore;
@@ -39,6 +39,6 @@
 #if USE(COREAUDIO)
     return adoptRef(new PlatformClockCA());
 #else
-    return adoptRef(new PlatformClockPOSIX());
+    return adoptRef(new ClockGeneric());
 #endif
 }

Copied: trunk/Source/WebCore/platform/ClockGeneric.cpp (from rev 99486, trunk/Source/WebCore/platform/posix/PlatformClockPOSIX.cpp) (0 => 99488)


--- trunk/Source/WebCore/platform/ClockGeneric.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/ClockGeneric.cpp	2011-11-07 23:17:42 UTC (rev 99488)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2011 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "ClockGeneric.h"
+
+#include "FloatConversion.h"
+#include <wtf/CurrentTime.h>
+
+using namespace WebCore;
+
+static const int32_t usecPerSec = 1e6;
+
+ClockGeneric::GenericClock()
+    : m_running(false)
+    , m_rate(1)
+    , m_offset(0)
+{
+    m_startTime = m_lastTime = currentTime();
+}
+
+void ClockGeneric::setCurrentTime(float time)
+{
+    m_startTime = m_lastTime = currentTime();
+    m_offset = time;
+}
+
+float ClockGeneric::currentTime() const
+{
+    if (m_running)
+        m_lastTime = currentTime();
+    float time = (narrowPrecisionToFloat(m_lastTime - m_startTime) * m_rate) + m_offset;
+    return time;
+}
+
+void ClockGeneric::setPlayRate(float rate)
+{
+    m_offset = currentTime();
+    m_lastTime = m_startTime = currentTime();
+    m_rate = rate;
+}
+
+void ClockGeneric::start()
+{
+    if (m_running)
+        return;
+
+    m_lastTime = m_startTime = currentTime();
+    m_running = true;
+}
+
+void ClockGeneric::stop()
+{
+    if (!m_running)
+        return;
+
+    m_offset = currentTime();
+    m_lastTime = m_startTime = currentTime();
+    m_running = false;
+}

Copied: trunk/Source/WebCore/platform/ClockGeneric.h (from rev 99486, trunk/Source/WebCore/platform/posix/PlatformClockPOSIX.h) (0 => 99488)


--- trunk/Source/WebCore/platform/ClockGeneric.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/ClockGeneric.h	2011-11-07 23:17:42 UTC (rev 99488)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2011 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ClockGeneric_h
+#define ClockGeneric_h
+
+#include "Clock.h"
+
+namespace WebCore {
+
+class ClockGeneric : public Clock {
+public:
+    ClockGeneric();
+
+private:
+    virtual void setCurrentTime(float);
+    virtual float currentTime() const;
+
+    virtual void setPlayRate(float);
+    virtual float playRate() const { return m_rate; }
+
+    virtual void start();
+    virtual void stop();
+    virtual bool isRunning() const { return m_running; }
+
+    bool m_running;
+    float m_rate;
+    float m_offset;
+    double m_startTime;
+    mutable double m_lastTime;
+};
+
+}
+
+#endif

Deleted: trunk/Source/WebCore/platform/posix/PlatformClockPOSIX.cpp (99487 => 99488)


--- trunk/Source/WebCore/platform/posix/PlatformClockPOSIX.cpp	2011-11-07 23:16:47 UTC (rev 99487)
+++ trunk/Source/WebCore/platform/posix/PlatformClockPOSIX.cpp	2011-11-07 23:17:42 UTC (rev 99488)
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#include "config.h"
-#include "PlatformClockPOSIX.h"
-
-#include "FloatConversion.h"
-
-using namespace WebCore;
-
-static const int32_t usecPerSec = 1e6;
-
-static float timevalToFloat(timeval val)
-{
-    return val.tv_sec + (val.tv_usec / static_cast<float>(usecPerSec));
-}
-
-static timeval timevalDelta(timeval first, timeval second)
-{
-    timeval delta;
-    delta.tv_sec = first.tv_sec - second.tv_sec;
-    delta.tv_usec = first.tv_usec - second.tv_usec;
-    while (delta.tv_usec < 0) {
-        delta.tv_usec += usecPerSec;
-        delta.tv_sec--;
-    }
-    return delta;
-}
-
-PlatformClockPOSIX::PlatformClockPOSIX()
-    : m_running(false)
-    , m_rate(1)
-    , m_offset(0)
-{
-    m_startTime = m_lastTime = now();
-}
-
-void PlatformClockPOSIX::setCurrentTime(float time)
-{
-    m_startTime = m_lastTime = now();
-    m_offset = time;
-}
-
-float PlatformClockPOSIX::currentTime() const
-{
-    if (m_running)
-        m_lastTime = now();
-    float time = (timevalToFloat(timevalDelta(m_lastTime, m_startTime)) * m_rate) + m_offset;
-    return time;
-}
-
-void PlatformClockPOSIX::setPlayRate(float rate)
-{
-    m_offset = currentTime();
-    m_lastTime = m_startTime = now();
-    m_rate = rate;
-}
-
-void PlatformClockPOSIX::start()
-{
-    if (m_running)
-        return;
-
-    m_lastTime = m_startTime = now();
-    m_running = true;
-}
-
-void PlatformClockPOSIX::stop()
-{
-    if (!m_running)
-        return;
-
-    m_offset = currentTime();
-    m_lastTime = m_startTime = now();
-    m_running = false;
-}
-
-timeval PlatformClockPOSIX::now() const
-{
-    timeval val;
-    gettimeofday(&val, 0);
-    return val;
-}

Deleted: trunk/Source/WebCore/platform/posix/PlatformClockPOSIX.h (99487 => 99488)


--- trunk/Source/WebCore/platform/posix/PlatformClockPOSIX.h	2011-11-07 23:16:47 UTC (rev 99487)
+++ trunk/Source/WebCore/platform/posix/PlatformClockPOSIX.h	2011-11-07 23:17:42 UTC (rev 99488)
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PlatformClockPOSIX_h
-#define PlatformClockPOSIX_h
-
-#include "Clock.h"
-#include <time.h>
-
-namespace WebCore {
-
-class PlatformClockPOSIX : public Clock {
-public:
-    PlatformClockPOSIX();
-
-private:
-    virtual void setCurrentTime(float);
-    virtual float currentTime() const;
-
-    virtual void setPlayRate(float);
-    virtual float playRate() const { return m_rate; }
-
-    virtual void start();
-    virtual void stop();
-    virtual bool isRunning() const { return m_running; }
-
-    timeval now() const;
-
-    bool m_running;
-    float m_rate;
-    float m_offset;
-    timeval m_startTime;
-    mutable timeval m_lastTime;
-};
-
-}
-
-#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to