Bug 218186 - CanvasCaptureMediaStreamTrack enables WebGL drawing buffer preserving and changes clear semantics
Summary: CanvasCaptureMediaStreamTrack enables WebGL drawing buffer preserving and cha...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-26 06:36 PDT by Kimmo Kinnunen
Modified: 2021-03-06 04:43 PST (History)
3 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 2020-10-26 06:36:01 PDT
CanvasCaptureMediaStreamTrack enables WebGL drawing buffer preserving

This changes de-facto observable behavior, as websites expect rAF to prepare the drawing buffer for display.

Web sites in general sometimes depend on the buffer clearing semantics.
Comment 1 Kimmo Kinnunen 2020-10-26 06:38:43 PDT
Marking as blocking WebGL GPU Process work, since this is buggy that would need to be implemented in remote WebGL.

This should be instead fixed by introducing a canvas monitoring callback for drawing buffer prepare and calling that before the buffer is being prepared for display.
Comment 2 Radar WebKit Bug Importer 2020-11-02 05:36:19 PST
<rdar://problem/70946812>
Comment 3 Kimmo Kinnunen 2021-03-06 04:43:59 PST
So the purpose of the feature is to take the webgl canvas contents and send it through webrtc, if I understand correctly.

What the implementation does is:
1) Turn on WebGL "preserve drawing buffer" flag of the webgl context.
2) Takes a snapshot of the webgl canvas contents at random point in time after each modification when the execution drops to main loop
3) send that picture over webrtc

Steps 1 and 2 are not good.