gpu: Share GL finalization helpers with GpuInit2::InitializeInProcess()
InitializeInProcess() repeated, inline, most of what the helpers used by
InitializeAndStartSandbox() do: collecting context info and recomputing
features (including the Windows WARP fallback), extension setup, the
default offscreen surface, extra info collection, the Linux core profile
recollection, the WARP info adjustment, disabling WebNN when GL is
disabled, and the native pixmap query.
Let FinalizeFeaturesWithContextInfo() and FinalizeGLInitialization()
handle the in-process case instead: failures are only logged and crash
keys are not set, as before. InitializeInProcess() now calls the helpers.
Also compute InitState::gl_disabled once in
InitializeGLBindingsAndDisplay(), and set
GPUInfo::gl_implementation_parts at the end of
FinalizeGLInitialization() for both paths.
Minor in-process behavior differences:
- CollectGpuExtraInfo() now runs before extension setup, and
InitializePlatformOverlaySettings() runs after the WARP info
adjustment, matching InitializeAndStartSandbox().
- gl_implementation_parts is set after a WARP reinitialization, so it
reflects WARP instead of the hardware GL implementation.
Bug: 570527192
Change-Id: I546e2793423ece371613be12ab37a3052bec66fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8718989
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: vikas soni <vikassoni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1734748}
NOKEYCHECK=True
GitOrigin-RevId: 7551f1b5bd5bd8c9196938060aab0ac8da08643d
2 files changed