| Summary: | Shutdown ANGLE on GPU process when last WebGL context is destroyed | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Kimmo Kinnunen <kkinnunen> | ||||||||||
| Component: | WebGL | Assignee: | Kimmo Kinnunen <kkinnunen> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | annulen, darin, dino, ews-watchlist, graouts, gyuyoung.kim, jonlee, kbr, kkinnunen, kondapallykalyan, ryuan.choi, sergio, webkit-bug-importer, ysuzuki | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | Other | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 217211 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Kimmo Kinnunen
2021-03-11 12:05:13 PST
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. Committed r274557: <https://commits.webkit.org/r274557> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423062 [details]. |