Bug 224927 - Handle rotation correctly in WebRTC GPUProcess rendering pipeline
Summary: Handle rotation correctly in WebRTC GPUProcess rendering pipeline
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-22 06:03 PDT by youenn fablet
Modified: 2021-04-23 07:32 PDT (History)
7 users (show)

See Also:


Attachments
Patch (4.30 KB, patch)
2021-04-22 06:08 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2021-04-22 06:03:58 PDT
Handle rotation correctly in WebRTC GPUProcess rendering pipeline
Comment 1 youenn fablet 2021-04-22 06:06:06 PDT
<rdar://76915991>
Comment 2 youenn fablet 2021-04-22 06:08:47 PDT
Created attachment 426802 [details]
Patch
Comment 3 Eric Carlson 2021-04-22 11:37:18 PDT
Comment on attachment 426802 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426802&action=review

> Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:81
> -    m_sampleBufferDisplayLayer->updateAffineTransform(transform);
> +    m_sampleBufferDisplayLayer->updateRootLayerAffineTransform(transform);

Why don't we have to do this in the web process? 

What happens in the web process if `updateAffineTransform`to rotates the root layer?
Comment 4 youenn fablet 2021-04-23 07:11:08 PDT
(In reply to Eric Carlson from comment #3)
> Comment on attachment 426802 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426802&action=review
> 
> > Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:81
> > -    m_sampleBufferDisplayLayer->updateAffineTransform(transform);
> > +    m_sampleBufferDisplayLayer->updateRootLayerAffineTransform(transform);
> 
> Why don't we have to do this in the web process? 
> 
> What happens in the web process if `updateAffineTransform`to rotates the
> root layer?

I am not quite sure why doing it in the root layer and not the sample layer fixes the rotation issue in GPUProcess.
If I use the root layer in WebProcess, rotation is fine but the internal sample buffer layer is being cropped.

I asked around and it would be good to have additional analysis in that area.
In the meantime, I am landing this patch now since it fixes the issue.
Comment 5 youenn fablet 2021-04-23 07:11:37 PDT
iOS-wk2 failure is unrelated.
Comment 6 EWS 2021-04-23 07:32:48 PDT
Committed r276497 (236956@main): <https://commits.webkit.org/236956@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426802 [details].