Changeset 106978 in webkit
- Timestamp:
- Feb 7, 2012 12:48:30 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 5 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r106879 r106978 1 2012-02-06 Jer Noble <jer.noble@apple.com> 2 3 Use CMClock as a timing source for PlatformClock where available. 4 https://bugs.webkit.org/show_bug.cgi?id=77885 5 6 Reviewed by Eric Carlson. 7 8 * wtf/Platform.h: Added WTF_USE_COREMEDIA. 9 1 10 2012-02-06 Filip Pizlo <fpizlo@apple.com> 2 11 -
trunk/Source/JavaScriptCore/wtf/Platform.h
r106650 r106978 1142 1142 #endif 1143 1143 1144 #if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) 1145 #define WTF_USE_COREMEDIA 1 1146 #endif 1147 1144 1148 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(QT) 1145 1149 #define WTF_USE_REQUEST_ANIMATION_FRAME_TIMER 1 -
trunk/Source/WebCore/ChangeLog
r106977 r106978 1 2012-02-06 Jer Noble <jer.noble@apple.com> 2 3 Use CMClock as a timing source for PlatformClock where available. 4 https://bugs.webkit.org/show_bug.cgi?id=77885 5 6 Reviewed by Eric Carlson. 7 8 No new tests; performance improvement covered by existing test cases. 9 10 * WebCore.xcodeproj/project.pbxproj: 11 * platform/Clock.cpp: 12 (Clock::create): Use PlatformClockCM if available. 13 * platform/mac/PlatformClockCM.h: Added. 14 (WebCore::PlatformClockCM::playRate): 15 (WebCore::PlatformClockCM::isRunning): 16 * platform/mac/PlatformClockCM.mm: Added. 17 (PlatformClockCM::PlatformClockCM): 18 (PlatformClockCM::initializeWithTimingSource): 19 (PlatformClockCM::setCurrentTime): 20 (PlatformClockCM::currentTime): 21 (PlatformClockCM::setPlayRate): 22 (PlatformClockCM::start): 23 (PlatformClockCM::stop): 24 1 25 2012-02-06 Anders Carlsson <andersca@apple.com> 2 26 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r106953 r106978 5599 5599 CD8203101395ACE700F956C6 /* WebWindowAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = CD82030E1395ACE700F956C6 /* WebWindowAnimation.h */; }; 5600 5600 CD8203111395ACE700F956C6 /* WebWindowAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD82030F1395ACE700F956C6 /* WebWindowAnimation.mm */; }; 5601 CDAA8D0A14D71B2E0061EA60 /* PlatformClockCM.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDAA8D0814D385600061EA60 /* PlatformClockCM.mm */; }; 5601 5602 CDD525D7145B6DD0008D204D /* JSHTMLMediaElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDF65CCC145B6AFE00C4C7AA /* JSHTMLMediaElementCustom.cpp */; }; 5602 5603 CDEA763014608A53008B31F1 /* PlatformClockCA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */; }; … … 12551 12552 CD82030E1395ACE700F956C6 /* WebWindowAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebWindowAnimation.h; sourceTree = "<group>"; }; 12552 12553 CD82030F1395ACE700F956C6 /* WebWindowAnimation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebWindowAnimation.mm; sourceTree = "<group>"; }; 12554 CDAA8D0714D385600061EA60 /* PlatformClockCM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformClockCM.h; sourceTree = "<group>"; }; 12555 CDAA8D0814D385600061EA60 /* PlatformClockCM.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformClockCM.mm; sourceTree = "<group>"; }; 12553 12556 CDBD93BA1333BD4B002570E3 /* fullscreenQuickTime.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = fullscreenQuickTime.css; sourceTree = "<group>"; }; 12554 12557 CDCE5CD014633BC900D47CCA /* EventTargetFactory.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventTargetFactory.in; sourceTree = "<group>"; }; … … 15036 15039 CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */, 15037 15040 CDEA762F146084EE008B31F1 /* PlatformClockCA.h */, 15041 CDAA8D0714D385600061EA60 /* PlatformClockCM.h */, 15042 CDAA8D0814D385600061EA60 /* PlatformClockCM.mm */, 15038 15043 BCAA486E14A052530088FAC4 /* PlatformEventFactoryMac.h */, 15039 15044 BCAA486D14A052530088FAC4 /* PlatformEventFactoryMac.mm */, … … 27093 27098 1AAADDE814DC8DF800AF64B3 /* ScrollingTreeNodeMac.mm in Sources */, 27094 27099 7A54857F14E02D51006AE05A /* InspectorHistory.cpp in Sources */, 27100 CDAA8D0A14D71B2E0061EA60 /* PlatformClockCM.mm in Sources */, 27095 27101 ); 27096 27102 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebCore/platform/Clock.cpp
r99488 r106978 27 27 #include "Clock.h" 28 28 29 #if USE(COREAUDIO) 29 #if USE(COREMEDIA) 30 #include "PlatformClockCM.h" 31 #elif USE(COREAUDIO) 30 32 #include "PlatformClockCA.h" 31 33 #else … … 37 39 PassRefPtr<Clock> Clock::create() 38 40 { 39 #if USE(COREAUDIO) 41 #if USE(COREMEDIA) 42 return adoptRef(new PlatformClockCM()); 43 #elif USE(COREAUDIO) 40 44 return adoptRef(new PlatformClockCA()); 41 45 #else -
trunk/Source/WebCore/platform/mac/PlatformClockCM.h
r106977 r106978 1 1 /* 2 * Copyright (C) 201 1Apple Inc. All rights reserved.2 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 21 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 25 26 #include "config.h" 26 #ifndef PlatformClockCM_h 27 #define PlatformClockCM_h 28 29 #if USE(COREMEDIA) 30 27 31 #include "Clock.h" 32 #include <wtf/RetainPtr.h> 28 33 29 #if USE(COREAUDIO) 30 #include "PlatformClockCA.h" 31 #else 32 #include "ClockGeneric.h" 34 typedef struct OpaqueCMTimebase* CMTimebaseRef; 35 typedef struct OpaqueCMClock* CMClockRef; 36 37 namespace WebCore { 38 39 class PlatformClockCM : public Clock { 40 public: 41 PlatformClockCM(); 42 PlatformClockCM(CMClockRef); 43 44 private: 45 void initializeWithTimingSource(CMClockRef); 46 47 virtual void setCurrentTime(float); 48 virtual float currentTime() const; 49 50 virtual void setPlayRate(float); 51 virtual float playRate() const { return m_rate; } 52 53 virtual void start(); 54 virtual void stop(); 55 virtual bool isRunning() const { return m_running; } 56 57 RetainPtr<CMTimebaseRef> m_timebase; 58 float m_rate; 59 bool m_running; 60 }; 61 62 } 63 33 64 #endif 34 65 35 using namespace WebCore;36 37 PassRefPtr<Clock> Clock::create()38 {39 #if USE(COREAUDIO)40 return adoptRef(new PlatformClockCA());41 #else42 return adoptRef(new ClockGeneric());43 66 #endif 44 }
Note: See TracChangeset
for help on using the changeset viewer.