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

Issue 735473 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Associate a gpu memory buffer request to an AcceleratedWidget

Project Member Reported by sadrul@chromium.org, Jun 21 2017

Issue description

The gpu memory buffer allocation code in ozone currently takes in a gfx::AcceleratedWidget [1], which it then uses to decide which GbmDevice or HardwareDisplayController to use [2, 3]. Chrome browser specifies this AcceleratedWidget only when it requests memory for the UI [4], and not for the renderer (uses the null widget) [5]. 

Explanation from reveman@:
The renderer using a null widget today means that contents from webgl, pepper, etc. can only take advantage of HW overlays when displayed on the primary DRM device. ARC++ is limited in the same way. We've considered that limitation acceptable for now.

With mus, we could introduce some API where clients can specify which window the buffer is being allocated for (e.g. in [6]), and the window server will then have enough information to decide what accelerated widget it should use to issue the request to viz.

[1] https://cs.chromium.org/chromium/src/ui/ozone/platform/drm/gpu/gbm_surface_factory.h?type=cs&sq=package:chromium&l=44
[2] https://cs.chromium.org/chromium/src/ui/ozone/platform/drm/gpu/drm_thread.cc?l=113
[3] https://cs.chromium.org/chromium/src/ui/ozone/platform/drm/gpu/drm_thread.cc?l=132
[4] https://cs.chromium.org/chromium/src/content/browser/gpu/browser_gpu_memory_buffer_manager.cc?l=93
[5] https://cs.chromium.org/chromium/src/content/browser/gpu/browser_gpu_memory_buffer_manager.cc?l=108
[6] https://cs.chromium.org/chromium/src/services/ui/public/interfaces/gpu.mojom?sq=package:chromium&dr=C&l=22
 

Comment 1 by piman@chromium.org, Jun 27 2017

The tricky bit is that when the renderer allocates resources, it doesn't have context as to where it will be displayed. Indeed it can even span multiple displays (between extended desktop and mirroring), so there may not even be an opportunity for choosing one true widget to allocate with.

We may be able to do a best effort thing where the browser (or WS) gives the renderer an idea about what display to choose (similarly to how we pick a display for BeginFrame and for the scale factor - do we even pick the same one for both of these?), accepting that it will change over time (i.e. possibly triggering re-raster), and that we need to ensure that the GMB needs to be displayable on other displays (using the GPU instead of overlay if needed).
Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment