New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 722793 link

Starred by 4 users

Issue metadata

Status: Started
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Consider using single buffer surface for software cursor

Project Member Reported by osh...@chromium.org, May 16 2017

Issue description

It's currently used for laser pointer for low latency update. This is probably useful for software cursor.
 

Comment 1 by zork@chromium.org, Dec 1 2017

Components: Internals>Compositing
Labels: -M-61 M-65
Status: Available (was: Untriaged)
Marking available, doesn't seem "untriaged" to me.
Owner: reve...@chromium.org
Status: Started (was: Available)
I've been doing some work here and hope to land it soon.
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dfacb5ac516a8ac06596c17e02963d3e5c6693bb

commit dfacb5ac516a8ac06596c17e02963d3e5c6693bb
Author: David Reveman <reveman@chromium.org>
Date: Sat Jan 06 04:44:08 2018

ash: Re-work fast ink code for software cursor support.

This provides some cleanup of the fast ink code and makes
changes that will allow it to be used when implementing
a software cursor.

- Introduce auto-refresh mode in order to prevent artifacts
  in a more reliable way when using single buffer updates.
  Auto-refresh, will cause the full fast ink view area to
  continuously be redrawn. Continuously redrawing the area
  is the only way to guarantee that single buffered updates
  are not clipped incorrectly.

- Auto-refresh mode can dynamically be turned off. This allows
  a fast ink based view to turn off continuous redrawing,
  the use of HW overlay and minimize the size of the quad
  when frequent updates are not expected. This is important
  for the software cursor use-case, where we need to minimize
  the overhead of the cursor sprite when not moving.

- Gives more control of buffer updates to the derived class.
  This is done by adding a ScopedPaint helper class that can
  be used to make updates to the GPU memory buffer. The
  increased control allows the derived class to decide when
  to update the buffer, and on what thread the update is done.
  This makes it possible to bypass the UI thread when
  updating the cursor position on Chrome OS devices.

Bug: 722793
Test: laser pointer and highlighter still work as expected
Change-Id: I7d3e25169952a39d6d6205298efd2dd488db74e7
Reviewed-on: https://chromium-review.googlesource.com/846749
Commit-Queue: David Reveman <reveman@chromium.org>
Reviewed-by: Vladislav Kaznacheev <kaznacheev@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527507}
[modify] https://crrev.com/dfacb5ac516a8ac06596c17e02963d3e5c6693bb/ash/fast_ink/fast_ink_view.cc
[modify] https://crrev.com/dfacb5ac516a8ac06596c17e02963d3e5c6693bb/ash/fast_ink/fast_ink_view.h
[modify] https://crrev.com/dfacb5ac516a8ac06596c17e02963d3e5c6693bb/ash/highlighter/highlighter_controller.cc
[modify] https://crrev.com/dfacb5ac516a8ac06596c17e02963d3e5c6693bb/ash/highlighter/highlighter_view.cc
[modify] https://crrev.com/dfacb5ac516a8ac06596c17e02963d3e5c6693bb/ash/highlighter/highlighter_view.h
[modify] https://crrev.com/dfacb5ac516a8ac06596c17e02963d3e5c6693bb/ash/laser/laser_pointer_controller.cc
[modify] https://crrev.com/dfacb5ac516a8ac06596c17e02963d3e5c6693bb/ash/laser/laser_pointer_view.cc
[modify] https://crrev.com/dfacb5ac516a8ac06596c17e02963d3e5c6693bb/ash/laser/laser_pointer_view.h

Project Member

Comment 5 by bugdroid1@chromium.org, Mar 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87b4b6996f8d730e95e780bff56b8bc31a6d80ba

commit 87b4b6996f8d730e95e780bff56b8bc31a6d80ba
Author: David Reveman <reveman@chromium.org>
Date: Fri Mar 09 21:22:22 2018

ash: Implement fast ink based software cursor with motion blur.

This implements a CursorView class based on FastInkView. It
provides smooth low-latency cursor movement with optional
motion blur on Chrome OS devices, especially devices with
HW overlay support.

Single buffer updates are done on a high priority cursor
paint thread and events are routed directly to this thread
from the EVDEV thread. This provides minimum latency
updates that are not affected by any work done on the UI
thread. The result is smoothness guarantees that are as
good or better than existing HW cursor on Chrome OS devices.

Fast ink based cursor is currently limited to when motion
blur is enabled but can become the default mechanism to
display the cursor. And as a result allow the HW overlay
currently assigned to the HW cursor to be used for contents
and apps.

Bug: 722793
Test: chrome --ash-enable-cursor-motion-blur
Change-Id: I2baf0b5746610aca33f44b966556304d4cfc700c
Reviewed-on: https://chromium-review.googlesource.com/846992
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542231}
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/BUILD.gn
[add] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/components/cursor/BUILD.gn
[add] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/components/cursor/DEPS
[add] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/components/cursor/OWNERS
[add] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/components/cursor/cursor_view.cc
[add] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/components/cursor/cursor_view.h
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/components/fast_ink/fast_ink_view.cc
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/components/fast_ink/fast_ink_view.h
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/display/DEPS
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/display/cursor_window_controller.cc
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/display/cursor_window_controller.h
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/highlighter/highlighter_view.cc
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/laser/laser_pointer_view.cc
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/public/cpp/ash_pref_names.h
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/public/cpp/ash_switches.cc
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/public/cpp/ash_switches.h
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ash/shell.cc
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/chrome/browser/about_flags.cc
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ui/events/ozone/chromeos/cursor_controller.cc
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ui/events/ozone/chromeos/cursor_controller.h
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ui/events/platform/x11/BUILD.gn
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ui/events/platform/x11/x11_event_source_libevent.cc
[modify] https://crrev.com/87b4b6996f8d730e95e780bff56b8bc31a6d80ba/ui/ozone/platform/drm/host/drm_cursor.cc

I've noticed the flag was freezing my Pixelbook (black screen) from time to time when enabled. Is that a known issue?
my pixelbook (i5) also hangs from time to time. If you don't have default resolution, the cursor size also changes.
Cursor size issue is know. That needs to be fixed.

It shouldn't be causing a freeze. Anything interesting in file:///var/log/ui/ui.LATEST after this happens? 

Sign in to add a comment