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

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

Issue 2858223003: Add TRACE_EVENTX() in WebAudio rendering pipe line (Closed)
Patch Set: Adjusting trace locations 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 | « third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/audio/AudioDestination.cpp
diff --git a/third_party/WebKit/Source/platform/audio/AudioDestination.cpp b/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
index 50f824098db3ac65896055fedfbca8dc4b2a9ca7..39d569fd56ae9f8ab1156cca8e02ef89622fce06 100644
--- a/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
+++ b/third_party/WebKit/Source/platform/audio/AudioDestination.cpp
@@ -34,6 +34,7 @@
#include "platform/WebTaskRunner.h"
#include "platform/audio/AudioUtilities.h"
#include "platform/audio/PushPullFIFO.h"
+#include "platform/instrumentation/tracing/TraceEvent.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "platform/wtf/PtrUtil.h"
#include "public/platform/Platform.h"
@@ -100,6 +101,9 @@ void AudioDestination::Render(const WebVector<float*>& destination_data,
double delay,
double delay_timestamp,
size_t prior_frames_skipped) {
+ TRACE_EVENT1("webaudio", "AudioDestination::Render",
+ "callback_buffer_size", number_of_frames);
+
// This method is called by AudioDeviceThread.
DCHECK(!IsRenderingThread());
@@ -135,6 +139,9 @@ void AudioDestination::RequestRenderOnWebThread(size_t frames_requested,
double delay,
double delay_timestamp,
size_t prior_frames_skipped) {
+ TRACE_EVENT1("webaudio", "AudioDestination::RequestRenderOnWebThread",
+ "frames_to_render", frames_to_render);
+
// This method is called by WebThread.
DCHECK(IsRenderingThread());
@@ -176,6 +183,7 @@ void AudioDestination::Start() {
// Start the "audio device" after the rendering thread is ready.
if (web_audio_device_ && !is_playing_) {
+ TRACE_EVENT0("webaudio", "AudioDestination::Start");
rendering_thread_ =
Platform::Current()->CreateThread("WebAudio Rendering Thread");
web_audio_device_->Start();
@@ -189,6 +197,7 @@ void AudioDestination::Stop() {
// This assumes stopping the "audio device" is synchronous and dumping the
// rendering thread is safe after that.
if (web_audio_device_ && is_playing_) {
+ TRACE_EVENT0("webaudio", "AudioDestination::Stop");
web_audio_device_->Stop();
rendering_thread_.reset();
is_playing_ = false;
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698