WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235600
Capturing WebGL canvas through peer connection shows the image flipped
https://bugs.webkit.org/show_bug.cgi?id=235600
Summary
Capturing WebGL canvas through peer connection shows the image flipped
Kimmo Kinnunen
Reported
2022-01-25 10:43:56 PST
Capturing WebGL canvas through peer connection shows the image flipped
Attachments
WIP
(41.98 KB, patch)
2022-01-26 10:29 PST
,
Kimmo Kinnunen
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(43.83 KB, patch)
2022-01-26 11:26 PST
,
Kimmo Kinnunen
no flags
Details
Formatted Diff
Diff
Simpler version
(20.43 KB, patch)
2022-01-27 00:18 PST
,
Kimmo Kinnunen
no flags
Details
Formatted Diff
Diff
Simpler version
(20.43 KB, patch)
2022-01-27 00:43 PST
,
Kimmo Kinnunen
no flags
Details
Formatted Diff
Diff
For debugging
(20.73 KB, patch)
2022-01-27 04:16 PST
,
Kimmo Kinnunen
no flags
Details
Formatted Diff
Diff
Patch
(20.60 KB, patch)
2022-01-27 05:53 PST
,
Kimmo Kinnunen
no flags
Details
Formatted Diff
Diff
Patch
(21.60 KB, patch)
2022-01-28 05:11 PST
,
Kimmo Kinnunen
no flags
Details
Formatted Diff
Diff
Patch
(21.60 KB, patch)
2022-01-28 06:28 PST
,
Kimmo Kinnunen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-01-25 14:04:05 PST
<
rdar://problem/88043325
>
Kimmo Kinnunen
Comment 2
2022-01-26 09:11:43 PST
https://youennf.github.io/webrtc-tests/src/content/capture/canvas-pc/
<-- shows the bug Note: The newer version of this fails to show anything:
https://webrtc.github.io/samples/src/content/capture/canvas-pc/
<-- does not show stuff
Kimmo Kinnunen
Comment 3
2022-01-26 09:14:52 PST
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
Kimmo Kinnunen
Comment 4
2022-01-26 10:29:51 PST
Created
attachment 450036
[details]
WIP
Kimmo Kinnunen
Comment 5
2022-01-26 11:26:54 PST
Created
attachment 450043
[details]
Patch
Dean Jackson
Comment 6
2022-01-26 14:03:18 PST
Comment on
attachment 450043
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=450043&action=review
> Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:556 > + // TODO: When this is moved to GraphicsContextGLCocoa, set m_mediaSampleRotationSession = nullptr.
s/TODO/FIXME/
> LayoutTests/webrtc/canvas-to-peer-connection.html:80 > +// FIXME: Tthis should be filled when 2D context supports HTMLCanvasElement.captureStream().
Typo: Tthis
Kimmo Kinnunen
Comment 7
2022-01-27 00:18:16 PST
Created
attachment 450107
[details]
Simpler version
Kimmo Kinnunen
Comment 8
2022-01-27 00:43:44 PST
Created
attachment 450112
[details]
Simpler version
youenn fablet
Comment 9
2022-01-27 01:19:31 PST
Comment on
attachment 450112
[details]
Simpler version View in context:
https://bugs.webkit.org/attachment.cgi?id=450112&action=review
> Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:791 > + 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.
Kimmo Kinnunen
Comment 10
2022-01-27 04:16:55 PST
Created
attachment 450124
[details]
For debugging
Kimmo Kinnunen
Comment 11
2022-01-27 05:53:18 PST
Created
attachment 450129
[details]
Patch
Kimmo Kinnunen
Comment 12
2022-01-28 05:11:48 PST
Created
attachment 450227
[details]
Patch
Kimmo Kinnunen
Comment 13
2022-01-28 06:28:58 PST
Created
attachment 450229
[details]
Patch
EWS
Comment 14
2022-01-29 03:50:55 PST
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]
.
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