Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(1)

Issue 2793593002: AudioWorklet prototype

Created:
1 year, 8 months ago by hongchan
Modified:
1 year, 4 months ago
Reviewers:
CC:
chromium-reviews, blink-reviews, haraken, Raymond Toy, hongchan, nhiroki
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Patch Set 1 : Initial Compilable Patch #

Patch Set 2 : Rebased after Blink renaming #

Patch Set 3 : First working prototype #

Patch Set 4 : Rebase, AudioWorkletProcessor IDL, AudioParamDescriptor #

Patch Set 5 : Rebase after ThreadedWorkletMessaginProxy change #

Total comments: 4

Patch Set 6 : AudioParam creation and processing #

Patch Set 7 : Resolved RefPtr Crash #

Patch Set 8 : Merge Worklet infra changes #

Patch Set 9 : Merge changes, AudioParam bug fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+978 lines, -56 lines) Patch
A third_party/WebKit/LayoutTests/webaudio/audioworklet/audioworklet-import.html View 1 2 3 4 5 6 7 1 chunk +38 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/webaudio/audioworklet/audioworkletnode-basic.html View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/webaudio/audioworklet/processors.js View 1 2 3 4 5 6 1 chunk +58 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/modules_idl_files.gni View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioNode.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioParam.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorklet.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.cpp View 1 2 3 4 5 6 7 8 7 chunks +36 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h View 1 2 3 4 5 6 7 1 chunk +60 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp View 1 2 3 4 5 6 7 2 chunks +168 lines, -3 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletNode.h View 1 2 3 4 5 6 7 1 chunk +79 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletNode.cpp View 1 2 3 4 5 6 7 8 1 chunk +195 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletNode.idl View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.h View 1 2 3 4 5 6 7 1 chunk +66 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.cpp View 1 2 3 4 5 6 7 1 chunk +69 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.h View 1 2 3 4 5 6 7 8 3 chunks +19 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.cpp View 1 2 3 4 5 6 7 8 3 chunks +28 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.idl View 1 2 3 4 5 6 7 8 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.cpp View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.cpp View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h View 1 2 3 4 5 6 7 8 5 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp View 1 2 3 4 5 6 7 8 4 chunks +45 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/WindowAudioWorklet.idl View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/audio/AudioDestination.h View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/audio/AudioDestination.cpp View 1 2 3 4 5 6 7 8 6 chunks +7 lines, -10 lines 0 comments Download

Messages

Total messages: 6 (5 generated)
nhiroki
1 year, 6 months ago (2017-06-07 14:43:52 UTC) #4
https://codereview.chromium.org/2793593002/diff/100001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp
(right):

https://codereview.chromium.org/2793593002/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp:27:
class AudioWorkletMessagingProxy::LoaderClient final
We could factor out this class to share this with ThreadedMessagingProxyBase.

https://codereview.chromium.org/2793593002/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.cpp:117:
GetWorkerInspectorProxy()->WorkerThreadCreated(document, GetWorkerThread(),
By the recent change, WorkerInspectorProxy::WorkerThreadCreated() is now called
in ThreadedMessagingProxyBase::InitializeWorkerThread(), so you don't have to
call it here.

https://codereview.chromium.org/2793593002/diff/100001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h
(right):

https://codereview.chromium.org/2793593002/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h:71:
std::unique_ptr<AudioWorkletObjectProxy> worklet_object_proxy_;
If having the AudioWorkletObjectProxy is the only difference from
ThreadedWorkletMessagingProxy, how about adding a virtual function to create the
object proxy in ThreadedWorkletMessagingProxy, making AudioWorkletMessagingProxy
override it and calling it in the ctor of ThreadedWorkletMessagingProxy like
this?

ThreadedWorkletMessagingProxy::ThreadedWorkletMessagingProxy(
    ExecutionContext* execution_context,
    WorkerClients* worker_clients)
    : ThreadedMessagingProxyBase(execution_context, worker_clients),
      weak_ptr_factory_(this) {
//  worklet_object_proxy_ = ThreadedWorkletObjectProxy::Create(
//      weak_ptr_factory_.CreateWeakPtr(), GetParentFrameTaskRunners());

  // CreateObjectProxy() is a virtual function and overridden
  // by AudioWorkletMessagingProxy.
  worklet_object_proxy_ = CreateObjectProxy(
      weak_ptr_factory_CreateWeakPtr(), GetParentFrameTaskRunners());
}

class AudioWorkletMessagingProxy : public ThreadedMessagingProxyBase {
 private:
   std::unique_ptr<WorkletObjectProxy> CreateObjectProxy(...) override {
     return WTF::MakeUnique<AudioWorkletObjectProxy>(...);
   }
}

https://codereview.chromium.org/2793593002/diff/100001/third_party/WebKit/Sou...
File third_party/WebKit/Source/modules/webaudio/AudioWorkletNode.h (right):

https://codereview.chromium.org/2793593002/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/modules/webaudio/AudioWorkletNode.h:22: static
PassRefPtr<AudioWorkletHandler> Create(AudioNode&,
PassRefPtr is deprecated. Can you use RefPtr?

Powered by Google App Engine
This is Rietveld 408576698