Commit 178471fe authored by Ian Vollick's avatar Ian Vollick Committed by Commit Bot

[vr] Remove content and omnibox shadows

They are large and no longer necessary with new environment colors.

Bug: None
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr
Change-Id: I37cfd71a712d0eafe2d08e592e728d04e47e1558
Reviewed-on: https://chromium-review.googlesource.com/1057387Reviewed-by: default avatarChristopher Grant <cjgrant@chromium.org>
Commit-Queue: Ian Vollick <vollick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558281}
parent 6fcf49e3
......@@ -28,7 +28,6 @@ static const char* g_ui_element_name_strings[] = {
"kContentFrame",
"kContentFrameHitPlane",
"kContentQuad",
"kContentQuadShadow",
"kControllerRoot",
"kControllerGroup",
"kLaser",
......@@ -84,7 +83,6 @@ static const char* g_ui_element_name_strings[] = {
"kOmniboxSuggestions",
"kOmniboxSuggestionsOuterLayout",
"kOmniboxOuterLayout",
"kOmniboxShadow",
"k2dBrowsingHostedUi",
"k2dBrowsingHostedUiContent",
"k2dBrowsingVisibiltyHider",
......
......@@ -27,7 +27,6 @@ enum UiElementName {
kContentFrame,
kContentFrameHitPlane,
kContentQuad,
kContentQuadShadow,
kControllerRoot,
kControllerGroup,
kLaser,
......@@ -83,7 +82,6 @@ enum UiElementName {
kOmniboxSuggestions,
kOmniboxSuggestionsOuterLayout,
kOmniboxOuterLayout,
kOmniboxShadow,
k2dBrowsingHostedUi,
k2dBrowsingHostedUiContent,
k2dBrowsingVisibiltyHider,
......
......@@ -25,8 +25,6 @@ static constexpr float kContentVerticalOffsetDMM = -0.1f;
static constexpr float kContentVerticalOffset =
kContentVerticalOffsetDMM * kContentDistance;
static constexpr float kContentCornerRadius = 0.005f * kContentWidth;
static constexpr float kContentShadowOffset = 0.09f;
static constexpr float kContentShadowIntesity = 0.4f;
static constexpr float kBackplaneSize = 1000.0f;
static constexpr float kBackgroundDistanceMultiplier = 1.414f;
......@@ -174,8 +172,6 @@ static constexpr float kOmniboxCloseButtonDiameterDMM = kButtonDiameterDMM;
static constexpr float kOmniboxCloseButtonVerticalOffsetDMM = -0.75f;
static constexpr float kOmniboxCornerRadiusDMM = 0.006f;
static constexpr float kOmniboxCloseButtonDepthOffset = -0.35f;
static constexpr float kOmniboxShadowOffset = 0.07f;
static constexpr float kOmniboxShadowIntensity = 0.4f;
static constexpr int kOmniboxTransitionMs = 300;
static constexpr float kOmniboxTextFieldIconButtonSizeDMM = 0.064f;
......
......@@ -1339,11 +1339,6 @@ void UiSceneCreator::CreateContentQuad() {
Resizer, resizer.get(),
if (value) { view->Reset(); }));
auto shadow = Create<Shadow>(kContentQuadShadow, kPhaseForeground);
shadow->set_intensity(kContentShadowIntesity);
shadow->SetTranslate(0, 0, -kContentShadowOffset);
shadow->set_corner_radius(kContentCornerRadius);
auto main_content = std::make_unique<ContentElement>(
content_input_delegate_,
base::BindRepeating(&UiBrowserInterface::OnContentScreenBoundsChanged,
......@@ -1366,7 +1361,6 @@ void UiSceneCreator::CreateContentQuad() {
main_content->SetDrawPhase(kPhaseForeground);
main_content->SetSize(kContentWidth, kContentHeight);
main_content->set_corner_radius(kContentCornerRadius);
main_content->SetTranslate(0, 0, kContentShadowOffset);
main_content->SetTransitionedProperties({BOUNDS});
main_content->SetTextInputDelegate(text_input_delegate_);
main_content->AddBinding(std::make_unique<Binding<bool>>(
......@@ -1442,8 +1436,7 @@ void UiSceneCreator::CreateContentQuad() {
model->reposition_window_permitted(),
UiElement, plane.get(), set_hit_testable));
shadow->AddChild(std::move(main_content));
resizer->AddChild(std::move(shadow));
resizer->AddChild(std::move(main_content));
plane->AddChild(std::move(resizer));
frame->AddChild(std::move(plane));
scene_->AddUiElement(k2dBrowsingContentGroup, std::move(frame));
......@@ -2578,14 +2571,6 @@ void UiSceneCreator::CreateOmnibox() {
base::TimeDelta::FromMilliseconds(kOmniboxTransitionMs));
VR_BIND_VISIBILITY(omnibox_root, model->get_mode() == kModeEditingOmnibox);
// The shadow also controls omnibox Y offset.
auto shadow = Create<Shadow>(kOmniboxShadow, kPhaseForeground);
shadow->set_intensity(kOmniboxShadowIntensity);
shadow->set_y_centering(BOTTOM);
shadow->set_corner_radius(kOmniboxCornerRadiusDMM);
shadow->SetTranslate(0, kOmniboxVerticalOffsetDMM - 0.5 * kOmniboxHeightDMM,
-kOmniboxShadowOffset);
auto omnibox_outer_layout =
Create<LinearLayout>(kOmniboxOuterLayout, kPhaseNone, LinearLayout::kUp);
......@@ -2799,18 +2784,18 @@ void UiSceneCreator::CreateOmnibox() {
auto omnibox_background = Create<Rect>(kOmniboxBackground, kPhaseForeground);
omnibox_background->set_bounds_contain_children(true);
omnibox_background->set_hit_testable(true);
omnibox_background->set_y_centering(BOTTOM);
omnibox_background->set_focusable(false);
omnibox_background->set_corner_radius(kOmniboxCornerRadiusDMM);
omnibox_background->SetTranslate(0, 0, kOmniboxShadowOffset);
omnibox_background->SetTranslate(
0, kOmniboxVerticalOffsetDMM - 0.5 * kOmniboxHeightDMM, 0);
VR_BIND_COLOR(model_, omnibox_background.get(),
&ColorScheme::omnibox_background, &Rect::SetColor);
omnibox_background->AddChild(std::move(omnibox_outer_layout));
shadow->AddChild(std::move(omnibox_background));
button_scaler->AddChild(std::move(close_button));
omnibox_root->AddChild(std::move(shadow));
omnibox_root->AddChild(std::move(omnibox_background));
omnibox_root->AddChild(std::move(button_scaler));
scaler->AddChild(std::move(omnibox_root));
......
......@@ -52,7 +52,6 @@ const std::set<UiElementName> kElementsVisibleInBrowsing = {
kContentFrame,
kContentFrameHitPlane,
kContentQuad,
kContentQuadShadow,
kBackplane,
kUrlBar,
kUrlBarBackButton,
......@@ -459,7 +458,6 @@ TEST_F(UiTest, HostedUiInWebVr) {
TEST_F(UiTest, UiUpdatesForFullscreenChanges) {
auto visible_in_fullscreen = kFloorCeilingBackgroundElements;
visible_in_fullscreen.insert(kContentQuad);
visible_in_fullscreen.insert(kContentQuadShadow);
visible_in_fullscreen.insert(kBackplane);
visible_in_fullscreen.insert(kCloseButton);
visible_in_fullscreen.insert(kController);
......
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