Update GpuMemoryAblationExperiment initialization and context handling
When running Pinpoint, and CQ Dry Runs of the GpuMemoryAblationExperiment being enabled-by-default, a few issues were uncovered: - GrContexts cannot always be initialized (crbug.com/1103780) - Nested changes to GLContext during initialization fails (crbug.com/1104316) - Nested deletion crashes in mutually-exclusive ways (crbug.com/1106926) This change looks to address these by restructuring how GpuMemoryAblationExperiment performs its initialization and context switches. - The feature will now disable itself for Mock/Stub GL impls. This will prevent attempting to create GrContext in tests where it will always fail. - For initialization and allocation a ui::ScopedMakeContext will be used. This allows resetting of previous state so that GLContexts can properly initialize. - Deletion will now be done on a PostTask. While some deletion errors can be addressed by resetting the context. Resetting the context itself can lead to accessing partially deleted objects. Setting a a null Surface instead of a scoped context would address these cases, but do not address deletion paths that need their context set the entire time. This update to initialization and context handling did help uncover other issues (1107497, 1107502, 1107509, 1107512) however those are either platforms we are not running Pinpoint on, or tied to specific test suites. The root causes of these failures will be investigated separately. Bug: 1103780, 1104316, 1106926 Change-Id: Ibf3c9a3a560912f5505f99870b848878a99da5ba Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2300183 Commit-Queue: Jonathan Ross <jonross@chromium.org> Reviewed-by:Jonathan Backer <backer@chromium.org> Reviewed-by:
Jonathan Ross <jonross@chromium.org> Cr-Commit-Position: refs/heads/master@{#792434}
Showing
Please register or sign in to comment