Spracherkennung für: .patch vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
From: Michael Froman <mfroman@mozilla.com>
Date: Tue,
7 Apr
2026 19:
06:
00 -
0500
Subject: Bug
2030139 - (fix-
15fd636394) disable perfetto usage to avoid new
third_party library.
Mercurial Revision:
https://hg.mozilla.org/mozilla-central/rev/f1981bae2720ec8087be98eb7f5f323c1d233640
---
video/video_stream_encoder.cc |
20 ++++++++------------
1 file changed,
8 insertions(+),
12 deletions(-)
diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc
index
14b8e04c89..
6e83701dc4
100644
--- a/video/video_stream_encoder.cc
+++ b/video/video_stream_encoder.cc
@@ -
859,
13 +
859,
11 @@ void VideoStreamEncoder::AddAdaptationResource(
// Map any externally added resources as kCpu for the sake of stats reporting.
// TODO(hbos): Make the manager map any unknown resources to kCpu and get rid
// of this MapResourceToReason() call.
- TRACE_EVENT_BEGIN("webrtc",
- "VideoStreamEncoder::AddAdaptationResource(latency)",
- perfetto::Track::FromPointer(this));
+ TRACE_EVENT_ASYNC_BEGIN0(
+ "webrtc", "VideoStreamEncoder::AddAdaptationResource(latency)", this);
encoder_queue_->PostTask([this, resource = std::move(resource)] {
- TRACE_EVENT_END("webrtc",
- /* VideoStreamEncoder::AddAdaptationResource(latency) */
- perfetto::Track::FromPointer(this));
+ TRACE_EVENT_ASYNC_END0(
+ "webrtc", "VideoStreamEncoder::AddAdaptationResource(latency)", this);
RTC_DCHECK_RUN_ON(encoder_queue_.get());
additional_resources_.push_back(resource);
stream_resource_manager_.AddResource(resource, VideoAdaptationReason::kCpu);
@@ -
1724,
8 +
1722,
7 @@ void VideoStreamEncoder::TraceFrameDropStart() {
RTC_DCHECK_RUN_ON(encoder_queue_.get());
// Start trace event only on the first frame after encoder is paused.
if (!encoder_paused_and_dropped_frame_) {
- TRACE_EVENT_BEGIN("webrtc", "EncoderPaused",
- perfetto::Track::FromPointer(this));
+ TRACE_EVENT_ASYNC_BEGIN0("webrtc", "EncoderPaused", this);
}
encoder_paused_and_dropped_frame_ = true;
}
@@ -
1734,
8 +
1731,
7 @@ void VideoStreamEncoder::TraceFrameDropEnd() {
RTC_DCHECK_RUN_ON(encoder_queue_.get());
// End trace event on first frame after encoder resumes, if frame was dropped.
if (encoder_paused_and_dropped_frame_) {
- TRACE_EVENT_END("webrtc", /* EncoderPaused */
- perfetto::Track::FromPointer(this));
+ TRACE_EVENT_ASYNC_END0("webrtc", "EncoderPaused", this);
}
encoder_paused_and_dropped_frame_ = false;
}
@@ -
2194,
8 +
2190,
8 @@ void VideoStreamEncoder::EncodeVideoFrame(const VideoFrame& v
ideo_frame,
}
accumulated_update_rect_is_valid_ = true;
- TRACE_EVENT_INSTANT("webrtc", "Encode", perfetto::Track::FromPointer(this),
- "render_time", video_frame.render_time_ms());
+ TRACE_EVENT_ASYNC_STEP_INTO0("webrtc", "Video", video_frame.render_time_ms(),
+ "Encode");
stream_resource_manager_.OnEncodeStarted(out_frame, time_when_posted_us);