Commit 76fef47a authored by Michael Spang's avatar Michael Spang Committed by Commit Bot

ozone: drm: Re-set cursor when GPU process connects (reland)

When the GPU process restarts we need to re-send the cursor bitmap since
all GPU process display state is lost.

It looks like it may have been broken all the way back to d818104f
("[Ozone-Drm] Notify cursor of channel established last"), which fixed a
different issue but also caused the message that was intended to restore
the cursor (in CommitBoundsChange) to not get delivered.

Reland fixing case where a GPU process connects and the cursor is not
placed because there are no displays to place it on. This should only
affects tests, because there's always at least one display on Chrome OS.

Bug: 908682
Test: kill $(pgrep -f type=gpu-process), cursor restored

Change-Id: I378d14e61c95822c2362d047123e5f7e40778a80
Reviewed-on: https://chromium-review.googlesource.com/c/1351143Reviewed-by: default avatarDaniel Nicoara <dnicoara@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611861}
parent a8aba993
......@@ -49,6 +49,8 @@ void DrmCursor::SetDrmCursorProxy(std::unique_ptr<DrmCursorProxy> proxy) {
DCHECK(thread_checker_.CalledOnValidThread());
base::AutoLock lock(lock_);
proxy_ = std::move(proxy);
if (window_ != gfx::kNullAcceleratedWidget)
SendCursorShowLocked();
}
void DrmCursor::ResetDrmCursorProxy() {
......
......@@ -78,9 +78,8 @@ void CursorIPC::Send(IPC::Message* message) {
FROM_HERE, base::BindOnce(send_callback_, message)))
return;
// Drop disconnected updates. DrmWindowHost will call
// CommitBoundsChange() when we connect to initialize the cursor
// location.
// Drop disconnected updates. The cursor will get set once we connect, via
// SetDrmCursorProxy().
delete message;
}
......
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