New issue
Advanced search Search tips

Issue 827210 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 730660



Sign in to add a comment

chrome://gpu can lie about compositing mode

Project Member Reported by kylec...@chromium.org, Mar 29 2018

Issue description

There is a path where GPU compositing fails, we fall back to software compositing but chrome://gpu still says GPU compositing. This happens if the decision to fallback is in response to a kFatalError from ContextProvider::BindToThread() in GpuProcessTransportFactory. It's triggered here:

https://cs.chromium.org/chromium/src/content/browser/compositor/gpu_process_transport_factory.cc?l=496&rcl=d04a1e5256a9fdd78f40cbdb73355408614e14f3

This calls GpuProcessTransportFactory::DisableGpuCompositing(), which calls CompositorModeReporterImpl::SetUsingSoftwareCompositing() but doesn't update GpuInfo/GpuDataProviderImpl/etc.

We also don't restart the GPU process to switch to SwiftShader so WebGL ends up being GPU accelerated with software compositing.

I think this failure mode is pretty rare. I was able to intentionally get into it, but most software compositing fallback happens due to blacklist or GPU process crashes and both of those work correctly.

The changes described in https://crbug.com/819474 should fix this.
 

Comment 1 by zmo@chromium.org, Mar 29 2018

Actually I am not sure about this. about:gpu page is more about GPU capabilities, which should be stable. i.e., if a GPU is capable of doing compositing (it's not blacklisted), then it should always say GpuCompositing: Enabled.

Internally if we decide to switch to software mode due to this reason and that, it doesn't affect GPU's capabilities.

At least that is the current design for about:gpu. Of course we can change the design if we feel an alternative is better suited for our needs.

Comment 2 by danakj@chromium.org, Mar 29 2018

Blocking: 730660
I think about:gpu should show the current state. We ask users to dump it to help us understand what they are seeing and if it says theyre using gpu compositing we'll assume they are. It's fine if it shows software compositing (but could use gpu but fatal error happened) or whatever, but I think it's bad if it shows the wrong state for our debugging.

Comment 3 by zmo@chromium.org, Mar 29 2018

Cc: -zmo@chromium.org
Owner: zmo@chromium.org
Status: Started (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 30 2018

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

commit df928557a1a267516e3995a1aa6978ced9deba6a
Author: Zhenyao Mo <zmo@chromium.org>
Date: Fri Mar 30 19:30:09 2018

about:gpu should report GpuCompositing real time status.

Right now it reports the GPU capability, i.e., if the feature is blacklisted.

Instead, now we track the status dynamically and about:gpu always reports the
actural status whether Chrome is running with GpuCompositing or software one.

BUG= 827210 
TEST=manual through about:gpu
R=danakj@chromium.org

Change-Id: I322c03de8750bbed2b5dcdc8569dd5dfb31dbe36
Reviewed-on: https://chromium-review.googlesource.com/986929
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547238}
[modify] https://crrev.com/df928557a1a267516e3995a1aa6978ced9deba6a/content/browser/compositor/gpu_process_transport_factory.cc
[modify] https://crrev.com/df928557a1a267516e3995a1aa6978ced9deba6a/content/browser/compositor/viz_process_transport_factory.cc
[modify] https://crrev.com/df928557a1a267516e3995a1aa6978ced9deba6a/content/browser/gpu/compositor_util.cc
[modify] https://crrev.com/df928557a1a267516e3995a1aa6978ced9deba6a/content/browser/gpu/gpu_data_manager_impl.cc
[modify] https://crrev.com/df928557a1a267516e3995a1aa6978ced9deba6a/content/browser/gpu/gpu_data_manager_impl.h
[modify] https://crrev.com/df928557a1a267516e3995a1aa6978ced9deba6a/content/browser/gpu/gpu_data_manager_impl_private.h

Comment 5 by zmo@chromium.org, Mar 30 2018

Status: Fixed (was: Started)
Blockedon: -819474

Sign in to add a comment