Bug 236139

Summary: RealtimeOutgoingVideoSourceCocoa rotation session should not use IOSurface
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description youenn fablet 2022-02-04 06:55:55 PST
RealtimeOutgoingVideoSourceCocoa rotation session should not use IOSurface
Comment 1 youenn fablet 2022-02-04 06:58:06 PST
Created attachment 450892 [details]
Patch
Comment 2 Eric Carlson 2022-02-04 09:22:01 PST
Comment on attachment 450892 [details]
Patch

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

> Source/WebCore/platform/graphics/cv/ImageRotationSessionVT.mm:102
> +        auto bufferPool = m_shouldUseIOSurface ? createIOSurfaceCVPixelBufferPool(m_rotatedSize.width(), m_rotatedSize.height(), m_pixelFormat, 0u, m_isCGImageCompatible == IsCGImageCompatible::Yes) : createInMemoryCVPixelBufferPool(m_rotatedSize.width(), m_rotatedSize.height(), m_pixelFormat, 0u, m_isCGImageCompatible == IsCGImageCompatible::Yes);

Nit: this is long enough that I think it would be easier to read and understand as an `if ... else`
Comment 3 youenn fablet 2022-02-08 03:05:11 PST
(In reply to Eric Carlson from comment #2)
> Comment on attachment 450892 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=450892&action=review
> 
> > Source/WebCore/platform/graphics/cv/ImageRotationSessionVT.mm:102
> > +        auto bufferPool = m_shouldUseIOSurface ? createIOSurfaceCVPixelBufferPool(m_rotatedSize.width(), m_rotatedSize.height(), m_pixelFormat, 0u, m_isCGImageCompatible == IsCGImageCompatible::Yes) : createInMemoryCVPixelBufferPool(m_rotatedSize.width(), m_rotatedSize.height(), m_pixelFormat, 0u, m_isCGImageCompatible == IsCGImageCompatible::Yes);
> 
> Nit: this is long enough that I think it would be easier to read and
> understand as an `if ... else`

OK, let's introduce createCVPixelBufferPool with an option shouldUseIOSurface parameter then.
Comment 4 youenn fablet 2022-02-08 03:07:53 PST
Created attachment 451230 [details]
Patch for landing
Comment 5 EWS 2022-02-08 04:27:52 PST
Committed r289365 (246953@main): <https://commits.webkit.org/246953@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 451230 [details].
Comment 6 Radar WebKit Bug Importer 2022-02-08 04:28:20 PST
<rdar://problem/88623072>