[Issue]
Memory increase when MediaStream video track is being rendered
[Cause]
When draw is throttled in cc::scheduler, scheduler is somehow
looped in triggering new deadlines for frame until CompositorFrameAck
is received. But, as there are multiple DidNotProduceFrame messages
also send, they might delay submission of compositor frame.
If so, CompositorFrameAck is also delayed which in return
just increases number of DidNotProduceFrame messages.
Main thread is not capable of processing them all. That's
the cause of memory increase - messages buffering. When video
rendering is suspended and buffered messages are processed,
memory returns to its normal value.
[Solution]
As we have custom implementation of CompositorFrameSink with
DidNotProduceFrame handler that is doing nothing, we can skip
posting mojo IPC message from renderer to browser.
Bug: https://cam.sprc.samsung.pl/browse/VDGAME-279
Change-Id: I39f9fc1201240705a3fe4eafc9488ca75f0343d3
Signed-off-by: Jakub Gajownik <j.gajownik2@samsung.com>
bool frame_completed = reason == FrameSkippedReason::kNoDamage;
bool waiting_on_main = reason == FrameSkippedReason::kWaitingOnMain;
power_mode_voter_.OnFrameSkipped(frame_completed, waiting_on_main);
+#if !defined(USE_EFL)
+ // DidNotProduceFrame is not implemented in browser side
+ // (RenderWidgetHostImpl). So there is no sense in blocking mojo IPC
+ // with messages that have no effect.
compositor_frame_sink_ptr_->DidNotProduceFrame(ack);
+#endif
}
void AsyncLayerTreeFrameSink::DidAllocateSharedBitmap(
uint64_t submit_time,
const SubmitCompositorFrameSyncCallback callback) {}
-void RenderWidgetHostImpl::DidNotProduceFrame(const viz::BeginFrameAck& ack) {}
+void RenderWidgetHostImpl::DidNotProduceFrame(const viz::BeginFrameAck& ack) {
+ // In case any implementation lands here, see related comment in
+ // AsyncLayerTreeFrameSink::DidNotProduceFrame.
+}
void RenderWidgetHostImpl::DidAllocateSharedBitmap(
base::ReadOnlySharedMemoryRegion region,