Currently, when the GLRenderer in the browser needs to check if a set of overlays is valid, it creates an OverlayCandidateList and sends it over to the GPU process for validation via the OverlayCandidateValidator.
OverlayCandidateList doesn't contain a reference to the actual buffers that we're planning to scanout, but only metadata that is later used by DrmOverlayValidator to allocate empty buffers just to do a pageflip test and validate/reject a set of overlays.
Unfortunately the metadata doesn't contain all the information needed, and we end up testing configurations of buffers that might differ from the ones we'll set for the atomic commit.
This can't be fixed adding more information to the metadata since Chrome doesn't even know all the information needed. Buffers imported via exo could be tiled in different ways, or compressed, and Chrome imports them without knowing these details.
Additionally, allocating buffers seems to be expensive, and while we cache them by size, it seems to be the cause of performance issues during resizing (b/64697790), since we end up allocating/deleting buffers every frame just for validation.
We're also wasting memory to keep around empty buffers, on some devices gbm buffers memory might be pinned.
It'd be nice to do the pageflip tests with the actual buffers that we intend to scanout. This should be made easier in the future once we have display compositor and drm thread in the same process.
Comment 1 by rjkroege@chromium.org
, Aug 17 2017Labels: Proj-Ozone-DRM Proj-Mustash-Mus-GPU
Status: Available (was: Untriaged)