Commit e050b53a authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

Fix a crash with weston-terminal

With weston-terminal, exo can submit a frame before resizing bounds
of a shell surface. In that case, the local surface id is not set to
the frame sink for mus. It causes the crash. Fixing the crash by
setting the local surface id to the frame sink during creating the
frame sink.

Bug: None
Change-Id: I5b3202c176d2788a52aedbb259e7b18b5f5b8dd4
Reviewed-on: https://chromium-review.googlesource.com/682768Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504193}
parent 3b09d5a1
...@@ -549,8 +549,9 @@ WindowPortMus::CreateLayerTreeFrameSink() { ...@@ -549,8 +549,9 @@ WindowPortMus::CreateLayerTreeFrameSink() {
auto frame_sink = RequestLayerTreeFrameSink( auto frame_sink = RequestLayerTreeFrameSink(
nullptr, nullptr,
aura::Env::GetInstance()->context_factory()->GetGpuMemoryBufferManager()); aura::Env::GetInstance()->context_factory()->GetGpuMemoryBufferManager());
local_layer_tree_frame_sink_ = frame_sink->GetWeakPtr();
local_surface_id_ = local_surface_id_allocator_.GenerateId(); local_surface_id_ = local_surface_id_allocator_.GenerateId();
frame_sink->SetLocalSurfaceId(local_surface_id_);
local_layer_tree_frame_sink_ = frame_sink->GetWeakPtr();
return std::move(frame_sink); return std::move(frame_sink);
} }
......
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