RESOLVED FIXED 221396
RemoteGraphicsContextGLProxy should support losing the context and should lose the context on timeouts
https://bugs.webkit.org/show_bug.cgi?id=221396
Summary RemoteGraphicsContextGLProxy should support losing the context and should los...
Kimmo Kinnunen
Reported 2021-02-04 03:44:58 PST
RemoteGraphicsContextGLProxy should support losing the context and should lose the context on timeouts
Attachments
Patch (167.60 KB, patch)
2021-02-04 04:17 PST, Kimmo Kinnunen
no flags
Patch (170.48 KB, patch)
2021-02-05 02:17 PST, Kimmo Kinnunen
no flags
rebase (170.41 KB, patch)
2021-02-09 05:35 PST, Kimmo Kinnunen
no flags
Kimmo Kinnunen
Comment 1 2021-02-04 04:17:27 PST
Kimmo Kinnunen
Comment 2 2021-02-05 02:17:38 PST
Kimmo Kinnunen
Comment 3 2021-02-09 05:35:36 PST
Simon Fraser (smfr)
Comment 4 2021-02-09 08:26:29 PST
Comment on attachment 419701 [details] rebase View in context: https://bugs.webkit.org/attachment.cgi?id=419701&action=review > Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:59 > + send(Messages::RemoteGraphicsContextGLProxy::WasCreated(true, extensions, requestableExtensions), m_graphicsContextGLIdentifier); What does the 'true' mean? > Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:182 > + // Skip messages intended for already removed messageReceiverMap() destinations. > +#if ENABLE(WEBGL) > + if (decoder.messageReceiverName() == Messages::RemoteGraphicsContextGLProxy::messageReceiverName()) > + return true; > +#endif This seems pretty unusual. Do we do this elsewhere? > Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:357 > + void disconnectGpuProcessIfNeeded(); > + void abandonGpuProcess(); What's the difference between these? What does "abandon" imply? > Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:39 > + if (!isContextLost()) { > + auto sendResult = send(Messages::RemoteGraphicsContextGL::SetFailNextGPUStatusCheck()); > + if (!sendResult) > + markContextLost(); > + } There's lot of boilerplate here. I wonder if we can factor this to avoid future mistakes where we forget to check context lost.
Kimmo Kinnunen
Comment 5 2021-02-10 03:56:00 PST
Thanks for the review! (In reply to Simon Fraser (smfr) from comment #4) >> + send(Messages::RemoteGraphicsContextGLProxy::WasCreated(true, extensions, requestableExtensions), m_graphicsContextGLIdentifier); > What does the 'true' mean? That the creation was success. I can improve this in future patches. > > Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:182 > > + // Skip messages intended for already removed messageReceiverMap() destinations. > > +#if ENABLE(WEBGL) > > + if (decoder.messageReceiverName() == Messages::RemoteGraphicsContextGLProxy::messageReceiverName()) > > + return true; > > +#endif > > This seems pretty unusual. Do we do this elsewhere? No. All sites are pretty buggy wrt various timeout, connection lost and graceful connection shutdown scenarios. > > Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:357 > > + void disconnectGpuProcessIfNeeded(); > > + void abandonGpuProcess(); > > What's the difference between these? What does "abandon" imply? One is where we disconnect the connection between the proxy and the object it proxies. Other is where the disconnect has happened (e.g. a timeout) and we just forget the object we proxied. > > > Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:39 > > + if (!isContextLost()) { > > + auto sendResult = send(Messages::RemoteGraphicsContextGL::SetFailNextGPUStatusCheck()); > > + if (!sendResult) > > + markContextLost(); > > + } > > There's lot of boilerplate here. I wonder if we can factor this to avoid > future mistakes where we forget to check context lost. Good idea, I'll change this in future commit.
EWS
Comment 6 2021-02-10 04:04:54 PST
Committed r272645: <https://commits.webkit.org/r272645> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419701 [details].
Radar WebKit Bug Importer
Comment 7 2021-02-10 14:42:30 PST
Note You need to log in before you can comment on or make changes to this bug.