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

Unified Diff: ppapi/shared_impl/ppb_audio_shared.cc

Issue 309483015: Add trace events for PPB audio callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_audio_shared.cc
diff --git a/ppapi/shared_impl/ppb_audio_shared.cc b/ppapi/shared_impl/ppb_audio_shared.cc
index 741a86f99bf9d4b82d207c53a9b80a114eb26e9c..99af9d7e7e20bfece9fd2f2870c13a1d2d2f13d9 100644
--- a/ppapi/shared_impl/ppb_audio_shared.cc
+++ b/ppapi/shared_impl/ppb_audio_shared.cc
@@ -4,6 +4,7 @@
#include "ppapi/shared_impl/ppb_audio_shared.h"
+#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "ppapi/nacl_irt/public/irt_ppapi.h"
#include "ppapi/shared_impl/ppapi_globals.h"
@@ -212,10 +213,13 @@ void PPB_Audio_Shared::Run() {
if (pending_data < 0)
break;
- PP_TimeDelta latency =
- static_cast<double>(pending_data) / bytes_per_second_;
- callback_.Run(
- client_buffer_.get(), client_buffer_size_bytes_, latency, user_data_);
+ {
+ TRACE_EVENT0("audio", "PPB_Audio_Shared::FireRenderCallback");
+ PP_TimeDelta latency =
+ static_cast<double>(pending_data) / bytes_per_second_;
+ callback_.Run(
+ client_buffer_.get(), client_buffer_size_bytes_, latency, user_data_);
+ }
// Deinterleave the audio data into the shared memory as floats.
audio_bus_->FromInterleaved(client_buffer_.get(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698