WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
218179
Make GraphicsContextGL draw to ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=218179
Summary
Make GraphicsContextGL draw to ImageBuffer
Kimmo Kinnunen
Reported
2020-10-26 06:00:05 PDT
Make GraphicsContextGL draw to ImageBuffer Current ownership for WebGL canvas is roughly: HTMLCanvasElement -> WebGLRenderingContextBase -> GraphicsContextGL -> WebGLLayer Current ownership for 2D canvas is roughly: HTMLCanvasElement -> CanvasBase -> ImageBuffer -> context This discrepancy is probably not warranted solely by the difference wrt 2D painting to document vs. WebGL "rendering to ac layer". There appears to be a lot of confusion because WebGL does not have a concept of a HTMLCanvasElement -level manipulatable drawing buffer and display buffer. Instead, when HTMLCanvasElement needs WebGL contents to its ImageBuffer, there is all sorts of hoops to be jumped and the code itself ends up buggy and suboptimal. Current: * clear logic is buggy * print / snapshot logic is buggy * Element::toDataURL logic is buggy * There's disproportionally high complexity and low quality implementation of reading back the WebGL canvas for above In addition, the webgl abstraction is wrong way around in order to do logical "remote webgl". The abstraction should/could be: - HTMLCanvasElement -> ImageBuffer - Create GraphicsContextGL that draws to this ImageBuffer - Create WebGLLayer (e.g. IOSurfaceLayer) that receives snapshots of the ImageBuffer during preparing the drawing buffer as display buffer - HTMLCanvasElement (et al) would operate mostly on the ImageBuffer, not large number of "if (is<WebGLRenderingContextBase>)" type code.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-11-02 05:01:14 PST
<
rdar://problem/70946153
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug