New issue
Advanced search Search tips

Issue 830930 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug
Proj-XR
Proj-XR-VR



Sign in to add a comment

VR: Avoid drawing overlay texture when there's no content to draw.

Project Member Reported by mthiesse@chromium.org, Apr 9 2018

Issue description

Apparently the way we composite the overlay texture to properly handle opacity is expensive.

We should try to detect when the overlay texture is empty and skip this work.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 11 2018

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

commit ee351c1cd2b342cfbb059447fc0a53f14c7beb16
Author: Michael Thiessen <mthiesse@chromium.org>
Date: Wed Apr 11 16:29:58 2018

VR: Avoid drawing the overlay Texture when it's empty.

The fallback Android UI path incurs a significant overhead cost to our
rendering pipeline when it's active, which used to be 100% of the time.

This CL uses a dummy canvas that extends the Android canvas and throws
an exception every time something is drawn to it to know whether or not
drawing the view tree was a no-op. If not a no-op, it actually draws
the view tree into our texture-backed canvas.

If the canvas is empty, then we can skip compositing it in our VR
rendering pipeline.

Bug:  830930 
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;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic1c93eeae67485e4d4f450598d6b9690d60d99ba
Reviewed-on: https://chromium-review.googlesource.com/999802
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Christopher Grant <cjgrant@chromium.org>
Reviewed-by: Yash Malik <ymalik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549907}
[add] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/EmptySniffingVrViewContainer.java
[add] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/NoopCanvas.java
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrViewContainer.java
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/android/java_sources.gni
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/android/vr/vr_gl_thread.cc
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/android/vr/vr_gl_thread.h
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/android/vr/vr_shell.cc
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/android/vr/vr_shell.h
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/vr/browser_ui_interface.h
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/vr/elements/content_element.cc
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/vr/elements/content_element.h
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/vr/model/model.h
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/vr/test/mock_browser_ui_interface.h
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/vr/ui.cc
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/vr/ui.h
[modify] https://crrev.com/ee351c1cd2b342cfbb059447fc0a53f14c7beb16/chrome/browser/vr/ui_scene_creator.cc

Status: Fixed (was: Started)
Labels: M-67 Test-Complete

Sign in to add a comment