Bug 222268 - Videos do not work as sources for WebGL TexImage calls in SW fallback case in GPU Process
Summary: Videos do not work as sources for WebGL TexImage calls in SW fallback case in...
Status: RESOLVED DUPLICATE of bug 222461
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: webglgpup 221838
  Show dependency treegraph
 
Reported: 2021-02-22 06:46 PST by Kimmo Kinnunen
Modified: 2021-02-26 16:04 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2021-02-22 06:46:52 PST
Videos do not work as sources for WebGL TexImage calls in SW fallback case in GPU Process

void MediaPlayerPrivateRemote::paintCurrentFrameInContext(GraphicsContext&, const FloatRect&)
{
    notImplemented();
}
Comment 1 Kimmo Kinnunen 2021-02-22 06:53:32 PST
Options to fix:
1) Implement readback in MediaPlayerPrivateRemote::paintCurrentFrameInContext
2) Move the ImageBuffer -> Texture logic from WebGLRenderingContextBase to GraphicsContextGL

2 is better long term
Comment 2 Radar WebKit Bug Importer 2021-02-24 11:59:29 PST
<rdar://problem/74706834>
Comment 3 Kimmo Kinnunen 2021-02-24 12:12:43 PST
For option 2:
The work is to convert 
void WebGLRenderingContextBase::texImageImpl(TexImageFunctionID functionID, GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLenum format, GCGLenum type, Image* image, GraphicsContextGL::DOMSource domSource, bool flipY, bool premultiplyAlpha, bool ignoreNativeImageAlphaPremultiplication, const IntRect& sourceImageRect, GCGLsizei depth, GCGLint unpackImageHeight)

to run on GPU process side resources.

Essentially converting Image* image to GPU process side resource.

However, that function _also_ needs to stay mostly working with Web process side resources, since some of the cases are such that probably no reasonable GPU process side resource exist.
Comment 4 Jer Noble 2021-02-26 14:31:18 PST
This was likely fixed by r273568, which will pull images across the process boundary when painting/texturing occurs there.
Comment 5 Peng Liu 2021-02-26 16:04:46 PST

*** This bug has been marked as a duplicate of bug 222461 ***