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 150030
[GStreamer][Mac] Fix WebAudio build
https://bugs.webkit.org/show_bug.cgi?id=150030
Summary
[GStreamer][Mac] Fix WebAudio build
Philippe Normand
Reported
2015-10-12 09:28:46 PDT
For now (at least) we should disable Accelerate.framework when building WebAudio for the GTK port on Mac. Unless we can somehow link against a .framework?
Attachments
Patch
(6.72 KB, patch)
2015-10-12 10:11 PDT
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
Patch
(7.75 KB, patch)
2015-10-21 09:31 PDT
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
Patch
(6.28 KB, patch)
2015-10-22 08:43 PDT
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2015-10-12 10:11:24 PDT
Created
attachment 262895
[details]
Patch
Martin Robinson
Comment 2
2015-10-12 10:21:33 PDT
Comment on
attachment 262895
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=262895&action=review
Looks pretty good, but I'm going to suggest a few tweaks.
> Source/WebCore/platform/audio/Biquad.cpp:40 > -#if OS(DARWIN) > +#if USING_ACCELERATE
Why USING instead of USE_, which is more common in WebKit and would allow the use of the USE(...) macro?
> Source/WebCore/platform/audio/Biquad.h:40 > +#if OS(DARWIN) && !PLATFORM(GTK) > +#define USING_ACCELERATE 1 > +#else > +#define USING_ACCELERATE 0 > +#endif
I think it might be worth calling this USE_ACCELERATE_FRAMEWORK since ACCELERATE is such a general term.
> Source/WebCore/platform/audio/DirectConvolver.cpp:77 > -#if OS(DARWIN) > +#if OS(DARWIN) && !PLATFORM(GTK) > #if defined(__ppc__) || defined(__i386__)
Why don't these apply to GTK+? The ChangeLog does not specify. Would USE(ACCELERATE_FRAMEWORK) make sense here as well?
> Source/WebCore/platform/audio/FFTFrame.h:41 > +#elif OS(DARWIN) > +#include <Accelerate/Accelerate.h> > #endif // USE(WEBAUDIO_GSTREAMER)
I think it might make sense to pull this out into its own block, simply because it's a little confusing to mix it with the GStreamer ones.
Philippe Normand
Comment 3
2015-10-21 09:20:22 PDT
Comment on
attachment 262895
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=262895&action=review
>> Source/WebCore/platform/audio/DirectConvolver.cpp:77 >> #if defined(__ppc__) || defined(__i386__) > > Why don't these apply to GTK+? The ChangeLog does not specify. Would USE(ACCELERATE_FRAMEWORK) make sense here as well?
The vDSP_conv function is part of the Accelerate.framework AFAICS. So yeah I'll update the ifdef accordingly :)
Philippe Normand
Comment 4
2015-10-21 09:31:01 PDT
Created
attachment 263684
[details]
Patch
Darin Adler
Comment 5
2015-10-21 12:20:28 PDT
Comment on
attachment 263684
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=263684&action=review
> Source/WTF/wtf/Platform.h:1136 > +/* Disable the Accelerate.framework on Darwin (and Linux obviously) flavors of the GTK and EFL ports. */ > +#if (OS(DARWIN) || OS(LINUX)) && (PLATFORM(GTK) || PLATFORM(EFL)) > +#define USE_ACCELERATE_FRAMEWORK 0 > +#else > +#define USE_ACCELERATE_FRAMEWORK 1 > +#endif
This conditional seems wrong. I wouldn’t want USE_ACCELERATE_FRAMEWORK to be 1 on Windows, for example. I think we want: #if OS(DARWIN) && !(PLATFORM(GTK) || PLATFORM(EFL)) #define USE_ACCELERATE_FRAMEWORK 1 #else #define USE_ACCELERATE_FRAMEWORK 0 #endif But maybe that’s not quite right either.
> Source/WebCore/platform/audio/DirectConvolver.cpp:355 > +#endif // OS(DARWIN) && !PLATFORM(GTK)
Not right. Please fix.
> Source/WebCore/platform/audio/FFTFrame.h:43 > +#if USE(ACCELERATE_FRAMEWORK) > +#include <Accelerate/Accelerate.h> > +#endif // USE(ACCELERATE_FRAMEWORK)
The comment on the #endif here doesn’t seem helpful. I think we should not do these when they are so close to the #if. Just makes things messier and less clear. Probably should mention this in coding style guidelines.
Philip Chimento
Comment 6
2015-10-21 21:40:29 PDT
Comment on
attachment 263684
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=263684&action=review
> Source/WTF/wtf/Platform.h:1131 > +/* Disable the Accelerate.framework on Darwin (and Linux obviously) flavors of the GTK and EFL ports. */
Note, I have something similar on #144560 at
https://bugs.webkit.org/attachment.cgi?id=255295&action=diff#a/Source/WTF/wtf/Platform.h_sec1
You might not have to add USE_ACCELERATE_FRAMEWORK, it looks like USE_ACCELERATE already exists.
Philippe Normand
Comment 7
2015-10-22 08:43:56 PDT
Created
attachment 263830
[details]
Patch
WebKit Commit Bot
Comment 8
2015-10-31 10:49:37 PDT
Comment on
attachment 263830
[details]
Patch Clearing flags on attachment: 263830 Committed
r191844
: <
http://trac.webkit.org/changeset/191844
>
WebKit Commit Bot
Comment 9
2015-10-31 10:49:40 PDT
All reviewed patches have been landed. Closing bug.
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