| Summary: | WebGL GPUP: Crash when running fast/mediastream/getUserMedia-to-canvas-1.html | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Kimmo Kinnunen <kkinnunen> | ||||||||||||||
| Component: | WebGL | Assignee: | Kimmo Kinnunen <kkinnunen> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | dino, eric.carlson, ews-watchlist, glenn, hta, jer.noble, jonlee, kbr, kkinnunen, kondapallykalyan, philipj, sergio, simon.fraser, tommyw, webkit-bug-importer, youennf | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | Other | ||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||
| OS: | Unspecified | ||||||||||||||||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=webglgpup https://bugs.webkit.org/show_bug.cgi?id=236382 https://bugs.webkit.org/show_bug.cgi?id=234536 https://bugs.webkit.org/show_bug.cgi?id=236878 |
||||||||||||||||
| Bug Depends on: | 236701 | ||||||||||||||||
| Bug Blocks: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Kimmo Kinnunen
2022-02-11 06:44:32 PST
Created attachment 452365 [details]
Patch
Comment on attachment 452365 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=452365&action=review > Source/WebCore/platform/VideoFrame.h:56 > virtual bool isCV() const { return false; } The CV abbreviation is a bit obscure here. > Source/WebCore/platform/VideoFrame.h:57 > + virtual RefPtr<WebCore::VideoFrameCV> asVideoFrameCV() = 0; This seems like a layering violation. Normally we'd do this by adding SPECIALIZE_TYPE_TRAITS macros to allow for is<> and downcast<> > Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:62 > + videoFrameCV = &downcast<WebCore::VideoFrameCV>(*videoFrame); This doesn't use asVideoFrameCV()? Comment on attachment 452365 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=452365&action=review >> Source/WebCore/platform/VideoFrame.h:57 >> + virtual RefPtr<WebCore::VideoFrameCV> asVideoFrameCV() = 0; > > This seems like a layering violation. Normally we'd do this by adding SPECIALIZE_TYPE_TRAITS macros to allow for is<> and downcast<> It has those. This method is different. It converts to the type. This is the polymorphic conversion function. >> Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:62 >> + videoFrameCV = &downcast<WebCore::VideoFrameCV>(*videoFrame); > > This doesn't use asVideoFrameCV()? No, that's a different function. Comment on attachment 452365 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=452365&action=review >> Source/WebCore/platform/VideoFrame.h:56 >> virtual bool isCV() const { return false; } > > The CV abbreviation is a bit obscure here. It seems fine to me, and it won't be the first time we've used it, e.g. GraphicsContextGLCV, PixelBufferConformerCV, GraphicsContextGLCVCocoa r=me once the bots are happy Created attachment 452506 [details]
Patch
Created attachment 452509 [details]
Patch
Created attachment 452515 [details]
Patch for landing
Created attachment 452524 [details]
Patch for landing
Created attachment 452538 [details]
Patch for landing
Committed r290175 (247506@main): <https://commits.webkit.org/247506@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 452538 [details]. nongpup webgl started to assert, will fix in bug 236878 Comment on attachment 452538 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=452538&action=review > Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:190 > + if (!videoFrame || !is<RemoteVideoFrameProxy>(*videoFrame)) This should probably be a FIXME, painting VP8 WebRTC streamed content on WebGL may exercise that code path. I filed https://bugs.webkit.org/show_bug.cgi?id=236972 to track this. |