Bug 237891 - RemoteGraphicsContextGLProxy omits context lost checks for back and front buffer access functions
Summary: RemoteGraphicsContextGLProxy omits context lost checks for back and front buf...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-15 07:02 PDT by Kimmo Kinnunen
Modified: 2022-03-15 14:31 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.64 KB, patch)
2022-03-15 07:19 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch (3.48 KB, patch)
2022-03-15 12:03 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2022-03-15 07:02:30 PDT
RemoteGraphicsContextGLProxy omits context lost checks for back and front buffer access functions
Comment 1 Kimmo Kinnunen 2022-03-15 07:03:09 PDT
<rdar://90245766>
Comment 2 Kimmo Kinnunen 2022-03-15 07:19:10 PDT
Created attachment 454704 [details]
Patch
Comment 3 Myles C. Maxfield 2022-03-15 09:34:09 PDT
Comment on attachment 454704 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=454704&action=review

> Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:142
> +        buffer.context().clearRect({ IntPoint(), buffer.backendSize() });

I’m a little confused. If the context is lost, how can you use the context to clearRect()?
Comment 4 Kimmo Kinnunen 2022-03-15 12:03:08 PDT
Created attachment 454739 [details]
Patch
Comment 5 Kimmo Kinnunen 2022-03-15 12:08:23 PDT
(In reply to Myles C. Maxfield from comment #3)
> 
> > Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:142
> > +        buffer.context().clearRect({ IntPoint(), buffer.backendSize() });
> 
> I’m a little confused. If the context is lost, how can you use the context
> to clearRect()?

It's different context (graphics context of the image buffer, vs graphicscontextgl of webgl)
However, that's a good point -- if the context is lost, the GPU Process is unreliable and will be shut down, so the image buffer drawing does not make sense either. I'll remove this for now.
Comment 6 EWS 2022-03-15 14:31:15 PDT
Committed r291314 (248453@main): <https://commits.webkit.org/248453@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 454739 [details].