WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 77885
Use CMClock as a timing source for PlatformClock where available.
https://bugs.webkit.org/show_bug.cgi?id=77885
Summary
Use CMClock as a timing source for PlatformClock where available.
Jer Noble
Reported
2012-02-06 11:07:54 PST
Use CMClock as a timing source for PlatformClock where available.
Attachments
Patch
(14.05 KB, patch)
2012-02-06 11:17 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(13.85 KB, patch)
2012-02-06 11:18 PST
,
Jer Noble
eric.carlson
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2012-02-06 11:17:08 PST
Created
attachment 125671
[details]
Patch
Jer Noble
Comment 2
2012-02-06 11:18:40 PST
Created
attachment 125672
[details]
Patch
Eric Carlson
Comment 3
2012-02-07 08:29:59 PST
Comment on
attachment 125672
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=125672&action=review
> Source/WebCore/platform/mac/PlatformClockCM.mm:48 > +static const int32_t DefaultTimeScale = 1000;
Please include a comment explaining why 1000 is the best magic timescale.
> Source/WebCore/platform/mac/PlatformClockCM.mm:57 > + CMAudioDeviceClockCreate(kCFAllocatorDefault, NULL, &rawClockPtr); > + RetainPtr<CMClockRef> clock(AdoptCF, rawClockPtr); > + initializeWithTimingSource(clock.get());
Is the temporary RetainPtr necessary?
Jer Noble
Comment 4
2012-02-07 09:53:49 PST
(In reply to
comment #3
)
> (From update of
attachment 125672
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=125672&action=review
> > > Source/WebCore/platform/mac/PlatformClockCM.mm:48 > > +static const int32_t DefaultTimeScale = 1000; > > Please include a comment explaining why 1000 is the best magic timescale.
Sure thing.
> > Source/WebCore/platform/mac/PlatformClockCM.mm:57 > > + CMAudioDeviceClockCreate(kCFAllocatorDefault, NULL, &rawClockPtr); > > + RetainPtr<CMClockRef> clock(AdoptCF, rawClockPtr); > > + initializeWithTimingSource(clock.get()); > > Is the temporary RetainPtr necessary?
Not strictly, no. But the RetainPtr takes care of null-checking before calling CFRelease, and does so even if an exception is thrown. And I've been yelled at* for not using RetainPtrs for temporary variables before. ;) *figuratively
Jer Noble
Comment 5
2012-02-07 12:48:47 PST
Committed
r106978
: <
http://trac.webkit.org/changeset/106978
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug