Capturing WebGL canvas through peer connection shows the image flipped
https://youennf.github.io/webrtc-tests/src/content/capture/canvas-pc/ <-- shows the bug
The newer version of this fails to show anything:
https://webrtc.github.io/samples/src/content/capture/canvas-pc/ <-- does not show stuff
Youenn Fablet 7:12 PM
canvas-pc is using legacy APIs that we do not support and it messes up the script. https://github.com/webrtc/samples/pull/1511
Created attachment 450036 [details]
Created attachment 450043 [details]
Comment on attachment 450043 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=450043&action=review
> + // TODO: When this is moved to GraphicsContextGLCocoa, set m_mediaSampleRotationSession = nullptr.
> +// FIXME: Tthis should be filled when 2D context supports HTMLCanvasElement.captureStream().
Created attachment 450107 [details]
Created attachment 450112 [details]
Comment on attachment 450112 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=450112&action=review
> + return MediaSampleAVFObjC::createImageSample(WTFMove(mediaSamplePixelBuffer), MediaSampleAVFObjC::VideoRotation::None, false);
When canvas is in GPUProcess, aren't we going the RemoteGraphicsContextGLProxyCocoa::paintCompositedResultsToMediaSample code path?
It seems that RemoteGraphicsContextGLCocoa::prepareForDisplay should somehow do the flip if needed to remove the need for RemoteGraphicsContextGLProxyCocoa::paintCompositedResultsToMediaSample to make the sample as upsidedown+flipped.
Created attachment 450124 [details]
Created attachment 450129 [details]
Created attachment 450227 [details]
Created attachment 450229 [details]
Committed r288789 (246566@main): <https://commits.webkit.org/246566@main>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 450229 [details].