Commit b8943e9f authored by Kramer Ge's avatar Kramer Ge Committed by Commit Bot

[ozone/wayland] Omit buffer commit and OnSubmission when window is null

In tab dragging, when dragged window snaps to a tab strip, the
corresponding WaylandWindow is destroyed. The corresponding buffer queue
in gpu process is expected to be destroyed soon, so omit upcoming
overlay commits should be safe.

Change-Id: I38923f461e9c1eb3ac63d72237989194b2f887d5
Bug: 1114767
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353554Reviewed-by: default avatarNick Yamane <nickdiego@igalia.com>
Reviewed-by: default avatarMaksim Sisov (GMT+3) <msisov@igalia.com>
Commit-Queue: Kramer Ge <fangzhoug@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797739}
parent 9796acf8
......@@ -807,9 +807,18 @@ void WaylandBufferManagerHost::CommitOverlays(
TRACE_EVENT0("wayland", "WaylandBufferManagerHost::CommitOverlays");
DCHECK(error_message_.empty());
if (widget == gfx::kNullAcceleratedWidget) {
error_message_ = "Invalid widget.";
TerminateGpuProcess();
}
WaylandWindow* window =
connection_->wayland_window_manager()->GetWindow(widget);
DCHECK(window);
// In tab dragging, window may have been destroyed when buffers reach here. We
// omit buffer commits and OnSubmission, because the corresponding buffer
// queue in gpu process should be destroyed soon.
if (!window)
return;
window->CommitOverlays(overlays);
}
......
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