cc: LayerTreeHostImpl::ClearUIResources causes macOS GL error spam |
|
Issue description
The function LayerTreeHostImpl::ClearUIResources contains the message:
// Immediately drop the backing instead of waiting for the resource to be
// returned from the ResourceProvider, as this is called in cases where the
// ability to clean up the backings will go away (context loss, shutdown).
LayerTreeHostImpl::SetVisible calls EvictAllUIResources which calls ClearUIResources, so this ends up happening at every tab-switch. And as a result, scrollbars resources are deleted immediately at tab-switch, while they're still being used by the display compositor, so we get the error
[.BrowserCompositor-0x7fb8748aec00]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[.BrowserCompositor-0x7fb8748aec00]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
These GL errors have been around for a long time, longer than the above comment, which is relatively recent.
,
Aug 11
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f0951c8174fc4739eb3eac68f75bb516b385ac4a commit f0951c8174fc4739eb3eac68f75bb516b385ac4a Author: Christopher Cameron <ccameron@chromium.org> Date: Sat Aug 11 18:24:40 2018 cc: Make EvictAllUIResources only evict resources, not destroy them This is to limit the error spew in about:gpu (currently any useful messages are easily lost in warnings about these blank-resource uses). This function in SetVisible(false) to ensure that resources be dropped at tab switch. The current implementation immediately deletes the GL resource backing, even if it may be in use by the display. This results in flashed-black scrollbars and lots of GL errors. Change EvictAllUIResources to just evict the resources without deleting their backing. The resources are then destroyed when they are returned from the display (at OnUIResourceReleased). Bug: 864905, 870317 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I1e079e1790275d3194b565457971e65f7d265587 Reviewed-on: https://chromium-review.googlesource.com/1171832 Commit-Queue: ccameron <ccameron@chromium.org> Reviewed-by: enne <enne@chromium.org> Cr-Commit-Position: refs/heads/master@{#582453} [modify] https://crrev.com/f0951c8174fc4739eb3eac68f75bb516b385ac4a/cc/trees/layer_tree_host_impl.cc [modify] https://crrev.com/f0951c8174fc4739eb3eac68f75bb516b385ac4a/cc/trees/layer_tree_host_impl.h |
|
►
Sign in to add a comment |
|
Comment 1 by danakj@chromium.org
, Jul 18