Commit 738e1373 authored by Peng Huang's avatar Peng Huang Committed by Chromium LUCI CQ

Fix a DCHECK crash in HardwareRendererViz dtor

Releasing SharedContextState needs a context current if it is GL.
So we need to make a gl context current for it.

Bug: 1157501
Change-Id: I7cdcff0422f83949065adcd386bb6d5f8c27a09b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2645332
Commit-Queue: Peng Huang <penghuang@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Auto-Submit: Peng Huang <penghuang@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846327}
parent 0ed369d3
......@@ -311,6 +311,7 @@ void HardwareRendererViz::InitializeOnViz(
HardwareRendererViz::~HardwareRendererViz() {
DCHECK_CALLED_ON_VALID_THREAD(render_thread_checker_);
output_surface_provider_.shared_context_state()->MakeCurrent(nullptr);
VizCompositorThreadRunnerWebView::GetInstance()->ScheduleOnVizAndBlock(
base::BindOnce([](std::unique_ptr<OnViz>) {}, std::move(on_viz_)));
}
......
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