Bug 208370

Summary: LocalSampleBufferDisplayLayer is not computing the correct bounds/position in GPUProcess
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description youenn fablet 2020-02-28 03:20:59 PST
LocalSampleBufferDisplayLayer is not computing the correct bounds/position in GPUProcess
Comment 1 youenn fablet 2020-02-28 04:17:41 PST
Created attachment 391972 [details]
Patch
Comment 2 youenn fablet 2020-02-28 05:16:21 PST
Created attachment 391974 [details]
Patch
Comment 3 Eric Carlson 2020-02-28 09:12:44 PST
Comment on attachment 391974 [details]
Patch

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

> Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:59
> +    if (!m_connection->sendSync(Messages::RemoteSampleBufferDisplayLayerManager::CreateLayer { m_identifier, hideRootLayer, size }, Messages::RemoteSampleBufferDisplayLayerManager::CreateLayer::Reply { contextId }, 0))

Could this be made async by allocating a local CALayer for m_videoLayer and inserting the CALayerHost layer as a child once you have the remote context ID?
Comment 4 youenn fablet 2020-02-28 10:07:44 PST
(In reply to Eric Carlson from comment #3)
> Comment on attachment 391974 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=391974&action=review
> 
> > Source/WebKit/WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:59
> > +    if (!m_connection->sendSync(Messages::RemoteSampleBufferDisplayLayerManager::CreateLayer { m_identifier, hideRootLayer, size }, Messages::RemoteSampleBufferDisplayLayerManager::CreateLayer::Reply { contextId }, 0))
> 
> Could this be made async by allocating a local CALayer for m_videoLayer and
> inserting the CALayerHost layer as a child once you have the remote context
> ID?

We should fix this at some point.
Your approach sounds good.
We could also make this async at WebCore level.
Comment 5 WebKit Commit Bot 2020-03-02 07:34:11 PST
Comment on attachment 391974 [details]
Patch

Clearing flags on attachment: 391974

Committed r257709: <https://trac.webkit.org/changeset/257709>
Comment 6 WebKit Commit Bot 2020-03-02 07:34:13 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2020-03-02 07:35:16 PST
<rdar://problem/59950161>