Shutdown ANGLE on GPU process when last WebGL context is destroyed
Created attachment 423046 [details] Patch
Created attachment 423047 [details] Patch
Created attachment 423050 [details] Patch
Created attachment 423062 [details] Patch
Comment on attachment 423062 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423062&action=review Looks good. The retain/release code looks correct to me. A few small points; r+ though. > Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLEEGLUtilities.h:2 > + * Copyright (C) 2020 Apple Inc. All rights reserved. 2021? > Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:55 > +static constexpr Seconds dispatchReleaseAllResourcesIfUnusedTimeout = 0.2_s; This feels like a short timeout to me. Consider bumping it up, maybe even to 1s or so. > Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:56 > +static unsigned remoteGraphicsContextCount; Guaranteed to be zero-initialized?
Comment on attachment 423062 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423062&action=review >> Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:56 >> +static unsigned remoteGraphicsContextCount; > > Guaranteed to be zero-initialized? Yes, globals like this are guaranteed to be zero-initialized by the C and C++ standards.
Internal memory benchmark observed 0.8-1.5% progression with this change.
<rdar://problem/75442792>
Committed r274557: <https://commits.webkit.org/r274557> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423062 [details].