New issue
Advanced search Search tips

Issue 842792 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 754101


Participants' hotlists:
Harmony-Cast-Dialog


Sign in to add a comment

Make the selected sink item in Harmony Cast Dialog not flicker when updating

Project Member Reported by taku...@chromium.org, May 14 2018

Issue description

Whenever there is a change to the data shown, the selected sink item turns white for a split second from the gray highlight color. We need to look into how to prevent this.
 
Cc: bsep@chromium.org
Whenever we have an update to the sinks list, we re-draw all the list items. When this happens, the sink at the selected index has to be re-selected, and we do that with InkDrop::SnapToActivated() [1]. However this makes the color transition in a short animation shown in the attached video (you can see the top sink flicker twice). If you play the video slowly, you can see the ink drop color fading in gradually.

I looked into the InkDrop code but wasn't sure where the animation was coming from.
Bret, do you know of a way to fix this?

[1] https://cs.chromium.org/chromium/src/chrome/browser/ui/views/media_router/cast_dialog_sink_button.cc?g=0&l=124
screen_capture-12.ogv
235 KB View Download

Comment 2 by bsep@chromium.org, May 24 2018

Hmm... SnapToActivated shouldn't be causing any animation, so that looks like a bug to me. I just clicked through all the implementations of SnapToActivated and nothing jumped out at me, so it probably needs a deeper investigation.

I wonder if there's some kind of "post-activated" state that's causing the animation?
Project Member

Comment 3 by bugdroid1@chromium.org, May 31 2018

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

commit 5fb567371d3a6233c60e5d075091c68eed4f05ac
Author: Takumi Fujimoto <takumif@chromium.org>
Date: Thu May 31 00:13:40 2018

[Harmony Cast Dialog] Fix the flickering seen when updating sinks

This fixes the bug in which the selected sink's inkdrop color fades in
instead of snapping to cause a flickering effect.

Bug:  842792 
Change-Id: Ic4819552ee6a45f20c654a5ee4d9211b34f1f313
Reviewed-on: https://chromium-review.googlesource.com/1079695
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Takumi Fujimoto <takumif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563081}
[modify] https://crrev.com/5fb567371d3a6233c60e5d075091c68eed4f05ac/chrome/browser/ui/views/media_router/cast_dialog_sink_button.cc
[modify] https://crrev.com/5fb567371d3a6233c60e5d075091c68eed4f05ac/chrome/browser/ui/views/media_router/cast_dialog_sink_button.h

Status: Fixed (was: Assigned)

Sign in to add a comment