Bug 222461 - [GPUP] Allow painting of GPUP hosted video from the WebContent process
Summary: [GPUP] Allow painting of GPUP hosted video from the WebContent process
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
: 221790 221791 221797 221806 221818 221823 221825 221838 222268 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-25 23:13 PST by Jer Noble
Modified: 2021-02-26 16:04 PST (History)
11 users (show)

See Also:


Attachments
Patch (22.96 KB, patch)
2021-02-25 23:21 PST, Jer Noble
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (25.65 KB, patch)
2021-02-25 23:55 PST, Jer Noble
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (25.88 KB, patch)
2021-02-26 00:15 PST, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2021-02-25 23:13:33 PST
[GPUP] Allow painting of GPUP hosted video from the WebContent process
Comment 1 Radar WebKit Bug Importer 2021-02-25 23:19:38 PST
<rdar://problem/74778890>
Comment 2 Jer Noble 2021-02-25 23:21:48 PST
Created attachment 421616 [details]
Patch
Comment 3 Jer Noble 2021-02-25 23:55:48 PST
Created attachment 421618 [details]
Patch
Comment 4 Jer Noble 2021-02-26 00:15:44 PST
Created attachment 421619 [details]
Patch
Comment 5 Eric Carlson 2021-02-26 08:28:54 PST
Comment on attachment 421619 [details]
Patch

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

> Source/WebCore/platform/graphics/cocoa/IOSurface.mm:304
> +    auto status = CVPixelBufferCreateWithIOSurface(kCFAllocatorDefault, m_surface.get(), nullptr, &rawBuffer);

Don't we want the pixel buffer to be GL/GLES compatible if possible? 

If so, see `ImageTransferSessionVT::ioSurfacePixelBufferCreationOptions`.
Comment 6 Jer Noble 2021-02-26 09:28:32 PST
(In reply to Eric Carlson from comment #5)
> Comment on attachment 421619 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=421619&action=review
> 
> > Source/WebCore/platform/graphics/cocoa/IOSurface.mm:304
> > +    auto status = CVPixelBufferCreateWithIOSurface(kCFAllocatorDefault, m_surface.get(), nullptr, &rawBuffer);
> 
> Don't we want the pixel buffer to be GL/GLES compatible if possible? 
> 
> If so, see `ImageTransferSessionVT::ioSurfacePixelBufferCreationOptions`.

Because we're merely transferring an existing IOSurface, that presumably is already GL compatible due to the flags we pass into the AVPlayerItemVideoOutput, I don't think we need to do any conformance here.  But I'll look into this to make sure the resulting pixel buffer _is_ GL compatible.
Comment 7 EWS 2021-02-26 11:28:42 PST
Committed r273568: <https://commits.webkit.org/r273568>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 421619 [details].
Comment 8 Peng Liu 2021-02-26 14:56:24 PST
*** Bug 221791 has been marked as a duplicate of this bug. ***
Comment 9 Peng Liu 2021-02-26 15:01:52 PST
*** Bug 221790 has been marked as a duplicate of this bug. ***
Comment 10 Peng Liu 2021-02-26 15:03:40 PST
*** Bug 221806 has been marked as a duplicate of this bug. ***
Comment 11 Peng Liu 2021-02-26 15:05:40 PST
*** Bug 221797 has been marked as a duplicate of this bug. ***
Comment 12 Peng Liu 2021-02-26 15:07:50 PST
*** Bug 221838 has been marked as a duplicate of this bug. ***
Comment 13 Peng Liu 2021-02-26 15:10:09 PST
*** Bug 221823 has been marked as a duplicate of this bug. ***
Comment 14 Peng Liu 2021-02-26 15:12:52 PST
*** Bug 221825 has been marked as a duplicate of this bug. ***
Comment 15 Peng Liu 2021-02-26 15:15:41 PST
*** Bug 221818 has been marked as a duplicate of this bug. ***
Comment 16 Peng Liu 2021-02-26 16:04:46 PST
*** Bug 222268 has been marked as a duplicate of this bug. ***