Commit bde46cd3 authored by CJ DiMeglio's avatar CJ DiMeglio Committed by Commit Bot

Fix such that compositor_frame_sink is not null for OnContextLost.

These calls were accidently misordered. |compositor_frame_sink_| needs to
stick around for the completion of resource_provider_->OnContextLost(),
as it uses the |compositor_frame_sink_| for DidDeleteSharedBitmap.

TBR=junov@chromium.org

Bug: 864657
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I24ace6f8766a2c4d9c77b359d61c4c4531b9b14e
Reviewed-on: https://chromium-review.googlesource.com/1142827Reviewed-by: default avatarCJ DiMeglio <lethalantidote@chromium.org>
Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Commit-Queue: CJ DiMeglio <lethalantidote@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576370}
parent 82e4b750
...@@ -301,10 +301,11 @@ void VideoFrameSubmitter::OnContextLost() { ...@@ -301,10 +301,11 @@ void VideoFrameSubmitter::OnContextLost() {
} }
waiting_for_compositor_ack_ = false; waiting_for_compositor_ack_ = false;
resource_provider_->OnContextLost();
// |compositor_frame_sink_| should be reset last. // |compositor_frame_sink_| should be reset last.
compositor_frame_sink_.reset(); compositor_frame_sink_.reset();
resource_provider_->OnContextLost();
context_provider_callback_.Run( context_provider_callback_.Run(
base::BindOnce(&VideoFrameSubmitter::OnReceivedContextProvider, base::BindOnce(&VideoFrameSubmitter::OnReceivedContextProvider,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment