Bug 208370 - LocalSampleBufferDisplayLayer is not computing the correct bounds/position in GPUProcess
Summary: LocalSampleBufferDisplayLayer is not computing the correct bounds/position in...
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: 2020-02-28 03:20 PST by youenn fablet
Modified: 2020-03-02 07:35 PST (History)
9 users (show)

See Also:


Attachments
Patch (17.66 KB, patch)
2020-02-28 04:17 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (16.43 KB, patch)
2020-02-28 05:16 PST, 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 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>