Chromium Code Reviews| Index: media/filters/decrypting_video_decoder.cc |
| diff --git a/media/filters/decrypting_video_decoder.cc b/media/filters/decrypting_video_decoder.cc |
| index cd93330262844ebe2a2478ca381293b287746eb2..f7ba299b5bae5eec8c9e11ffc6e6be8c8636322c 100644 |
| --- a/media/filters/decrypting_video_decoder.cc |
| +++ b/media/filters/decrypting_video_decoder.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/bind.h" |
| #include "base/callback_helpers.h" |
| +#include "base/debug/trace_event.h" |
| #include "base/location.h" |
| #include "base/message_loop_proxy.h" |
| #include "media/base/bind_to_loop.h" |
| @@ -28,7 +29,8 @@ DecryptingVideoDecoder::DecryptingVideoDecoder( |
| state_(kUninitialized), |
| request_decryptor_notification_cb_(request_decryptor_notification_cb), |
| decryptor_(NULL), |
| - key_added_while_pending_decode_(false) { |
| + key_added_while_pending_decode_(false), |
| + trace_id_(0) { |
| } |
| void DecryptingVideoDecoder::Initialize( |
| @@ -290,6 +292,8 @@ void DecryptingVideoDecoder::DoDecryptAndDecodeBuffer( |
| void DecryptingVideoDecoder::DecodePendingBuffer() { |
| DCHECK(message_loop_->BelongsToCurrentThread()); |
| DCHECK_EQ(state_, kPendingDecode) << state_; |
| + TRACE_EVENT_ASYNC_BEGIN0( |
| + "eme", "DecryptingVideoDecoder::DecodePendingBuffer", ++trace_id_); |
|
scherkus (not reviewing)
2012/11/01 22:22:36
OOC does ++trace_id_ still execute if we're not tr
xhwang
2012/11/02 01:33:54
Good question. Experiments show that when not reco
|
| decryptor_->DecryptAndDecodeVideo( |
| pending_buffer_to_decode_, |
| base::Bind(&DecryptingVideoDecoder::DeliverFrame, this, |
| @@ -315,6 +319,8 @@ void DecryptingVideoDecoder::DoDeliverFrame( |
| const scoped_refptr<VideoFrame>& frame) { |
| DVLOG(3) << "DoDeliverFrame() - status: " << status; |
| DCHECK(message_loop_->BelongsToCurrentThread()); |
| + TRACE_EVENT_ASYNC_END0( |
| + "eme", "DecryptingVideoDecoder::DecodePendingBuffer", trace_id_); |
| if (state_ == kStopped) |
| return; |