Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(900)

Unified Diff: third_party/WebKit/Source/platform/audio/AudioDestination.h

Issue 2885483002: Expose WebThread rendering only when AudioWorklet flag is enabled (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/audio/AudioDestination.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/audio/AudioDestination.h
diff --git a/third_party/WebKit/Source/platform/audio/AudioDestination.h b/third_party/WebKit/Source/platform/audio/AudioDestination.h
index bbf8426212d2fae5f7245f2588df59ab38a0722f..5664560b0c482f34d9202d09afcc427e2ae6c882 100644
--- a/third_party/WebKit/Source/platform/audio/AudioDestination.h
+++ b/third_party/WebKit/Source/platform/audio/AudioDestination.h
@@ -74,13 +74,12 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback {
double delay_timestamp,
size_t prior_frames_skipped) override;
- // The actual render request to the WebAudio destination node. This triggers
- // the WebAudio rendering pipe line on the web thread.
- void RequestRenderOnWebThread(size_t frames_requested,
- size_t frames_to_render,
- double delay,
- double delay_timestamp,
- size_t prior_frames_skipped);
+ // The actual render request to the WebAudio destination node.
+ void RequestRender(size_t frames_requested,
+ size_t frames_to_render,
+ double delay,
+ double delay_timestamp,
+ size_t prior_frames_skipped);
virtual void Start();
virtual void Stop();
@@ -96,6 +95,8 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback {
// hardware.
int FramesPerBuffer() const;
+ bool IsAudioWorkletEnabled() const { return is_audio_worklet_enabled; }
+
// The information from the actual audio hardware. (via Platform::current)
static float HardwareSampleRate();
static unsigned long MaxChannelCount();
@@ -106,8 +107,6 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback {
size_t HardwareBufferSize();
- bool IsRenderingThread();
-
// Accessed by the main thread.
std::unique_ptr<WebAudioDevice> web_audio_device_;
const unsigned number_of_output_channels_;
@@ -134,6 +133,9 @@ class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback {
// Accessed by rendering thread.
size_t frames_elapsed_;
+
+ // For signle thread rendering pipe line.
Raymond Toy 2017/05/15 17:42:24 "signle" And the comment doesn't really explain w
+ const bool is_audio_worklet_enabled;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/audio/AudioDestination.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698