DescriptionRevert of Mac h264: Work around CGLContext+VTDecompresionSession deadlock (patchset #5 id:80001 of https://codereview.chromium.org/1862183003/ )
Reason for revert:
This didn't fix the issue.
The issue appears to be a GL program leak.
Original issue's description:
> Mac h264: Work around CGLContext+VTDecompresionSession deadlock
>
> When we converted h264 to be decoded as 4:2:0 instead of 4:2:2, we
> noticed a spike in GPU crash rates, in particular, in CGLDestroyContext.
> Many of these crashes had other threads in VideoToolbox in what appears
> to be a deadlock.
>
> Part of the change from 4:2:2 to 4:2:0 is adding a path where we will
> do manual YUV->RGB conversion if we cannot display directly with
> CoreAnimation. In the process of this conversion, we bind the planes
> of the IOSurface allocated by VideoToolbox to OpenGL textures. We leave
> these bound until the GLImage is destroyed.
>
> My guess here is that the destruction of these resources in the driver
> is being deferred until CGLDestroyContext (we have seen that IOSurfaces
> can be kept around in the OpenGL driver long after they are unbound
> in crbug.com/158469), whereupon they are triggering a deadlock with
> VideoToolbox, which may be re-using them.
>
> This patch forces us to destroy the OpenGL texture objects that
> reference the IOSurfaces immediately after use (and while their owning
> CVPixelBuffer is still retained), which will hopefully avoid the
> conflict with VideoToolbox.
>
> Note that this is a speculative fix.
>
> BUG=598388
>
> Committed: https://crrev.com/f838f5f4880b9f4fe54e6e10812708c1c89b23d7
> Cr-Commit-Position: refs/heads/master@{#385690}
TBR=dcastagna@chromium.org,avi@chromium.org,reveman@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=598388
Patch Set 1 #
Messages
Total messages: 5 (1 generated)
|