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

Issue 758555 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug
Proj-VR
Proj-XR
Proj-XR-VR

Blocked on:
issue 758548



Sign in to add a comment

Combine visibility related properties

Project Member Reported by vollick@chromium.org, Aug 24 2017

Issue description

The start of the journey:

Currently, visibility transitions are implemented via a step function where the step happens at time fraction t=1.0. This works well when hiding an animation (consider transitioning opacity to 0.0 and visibility to false). In this case, the visibility gets set to false at the end of the transition and all is well.

However, consider transitioning opacity from 0.0 to 1.0 and visibility to true. In this case, visibility will be false for the duration of the transition and snap to true at the end.

Solutions that involve fixing transitions are a little gross.
 * we could permit asymmetric timing functions depending on the target value
 * we could force visibility to true at the beginning of the transition (i.e., explicitly tell it not to transition)

It seems simplest to combine the notion of visibility and opacity and not deal with boolean curves at all. Moreover, we can also combine the notion of enabled, but there are gotchas. The goal of the enabled property was to allow toggling of visibility while an element was "in the scene". For example, the fullscreen toast that comes and goes in 2D browsing mode every time you enter fullscreen mode.

Setting these elements to be disabled ensures that they will never appear when toggling visibility if the mode is wrong (eg, we'd never want to show a 2D browsing element in WebVR mode).

This same effect can be accomplished, however, by hiding subtrees. I.e., if we set the opacity of an element at the root of a subtree to zero, then this subtree will be entirely hidden.

If we construct our UiElement hierarchy correctly, then, we can can get the safety afforded to us by the enabled property.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 30 2017

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

commit df62453e0d6cc45295fc99f43832feea1b77c46e
Author: Ian Vollick <vollick@chromium.org>
Date: Wed Aug 30 19:49:16 2017

[vr] Combine visibility-related properties

In this change, we combine the notion of visibility, opacity and
enabledness. Since this also removes the only usage of the boolean
animation curve, I've removed it as well.

Bug:  758555 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Idd3f8e195a31c46d7884e4d8ac02fd73c4dacb53
Reviewed-on: https://chromium-review.googlesource.com/602247
Commit-Queue: Ian Vollick <vollick@chromium.org>
Reviewed-by: Christopher Grant <cjgrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498573}
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/cc/animation/animation.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/cc/animation/animation_curve.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/cc/animation/animation_curve.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/cc/animation/animation_player.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/cc/animation/animation_target.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/cc/animation/keyframed_animation_curve.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/cc/animation/keyframed_animation_curve.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/cc/animation/keyframed_animation_curve_unittest.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/cc/trees/target_property.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/animation_player.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/animation_player.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/animation_player_unittest.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/linear_layout.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/linear_layout_unittest.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/loading_indicator.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/loading_indicator.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/simple_textured_element.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/transience_manager.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/transience_manager.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/transience_manager_unittest.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/ui_element.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/ui_element.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/ui_element_name.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/ui_element_unittest.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/webvr_url_toast.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/elements/webvr_url_toast.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/target_property.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/test/ui_scene_manager_test.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/test/ui_scene_manager_test.h
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/ui_scene.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/ui_scene_manager.cc
[modify] https://crrev.com/df62453e0d6cc45295fc99f43832feea1b77c46e/chrome/browser/vr/ui_scene_manager_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment