Changeset 257932 in webkit


Ignore:
Timestamp:
Mar 5, 2020 11:02:53 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION: [ Mac ] fast/canvas/webgl/texImage2D-video-flipY-false.html is Timing out
https://bugs.webkit.org/show_bug.cgi?id=205734

Source/WebCore:

Fix two bugs in MediaPlayerPrivateAVFoundationObjC causing the
preferred AVPlayerItemVideoOutput code path to not be taken, in
the situation where GPU-to-GPU copies are not possible because the
video's format doesn't allow them.

Implement currentTime, fixing longstanding bug in the
AVAssetImageGenerator fallback where only the first frame of the
video would be displayed.

Covered by existing layout test.

Patch by Kenneth Russell <kbr@chromium.org> on 2020-03-05
Reviewed by Dean Jackson.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):

LayoutTests:

Reenable layout test on macOS.

Patch by Kenneth Russell <kbr@chromium.org> on 2020-03-05
Reviewed by Dean Jackson.

  • platform/mac/TestExpectations:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r257931 r257932  
     12020-03-05  Kenneth Russell  <kbr@chromium.org>
     2
     3        REGRESSION: [ Mac ] fast/canvas/webgl/texImage2D-video-flipY-false.html is Timing out
     4        https://bugs.webkit.org/show_bug.cgi?id=205734
     5
     6        Reenable layout test on macOS.
     7
     8        Reviewed by Dean Jackson.
     9
     10        * platform/mac/TestExpectations:
     11
    1122020-03-05  Jacob Uphoff  <jacob_uphoff@apple.com>
    213
  • trunk/LayoutTests/platform/mac/TestExpectations

    r257847 r257932  
    20302030webkit.org/b/207858 fast/canvas/webgl/simulated-vertexAttrib0-invalid-indicies.html [ Failure ]
    20312031webkit.org/b/207858 fast/canvas/webgl/webgl2-texture-upload-enums.html [ Failure ]
    2032 webkit.org/b/207858 fast/canvas/webgl/texImage2D-video-flipY-false.html [ Skip ]
    20332032webkit.org/b/207858 webgl/1.0.3/conformance/programs/program-test.html [ Failure ]
    20342033
  • trunk/Source/WebCore/ChangeLog

    r257929 r257932  
     12020-03-05  Kenneth Russell  <kbr@chromium.org>
     2
     3        REGRESSION: [ Mac ] fast/canvas/webgl/texImage2D-video-flipY-false.html is Timing out
     4        https://bugs.webkit.org/show_bug.cgi?id=205734
     5
     6        Fix two bugs in MediaPlayerPrivateAVFoundationObjC causing the
     7        preferred AVPlayerItemVideoOutput code path to not be taken, in
     8        the situation where GPU-to-GPU copies are not possible because the
     9        video's format doesn't allow them.
     10
     11        Implement currentTime, fixing longstanding bug in the
     12        AVAssetImageGenerator fallback where only the first frame of the
     13        video would be displayed.
     14
     15        Covered by existing layout test.
     16
     17        Reviewed by Dean Jackson.
     18
     19        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
     20        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     21        (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime const):
     22        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
     23        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
     24
    1252020-03-05  youenn fablet  <youenn@apple.com>
    226
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h

    r257926 r257932  
    154154#endif
    155155
     156    float currentTime() const override;
    156157    MediaTime currentMediaTime() const override;
    157158
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r257926 r257932  
    12231223}
    12241224
     1225float MediaPlayerPrivateAVFoundationObjC::currentTime() const
     1226{
     1227    return currentMediaTime().toFloat();
     1228}
     1229
    12251230MediaTime MediaPlayerPrivateAVFoundationObjC::currentMediaTime() const
    12261231{
     
    14991504    BEGIN_BLOCK_OBJC_EXCEPTIONS;
    15001505
    1501     if (videoOutputHasAvailableFrame())
     1506    // Callers of this will often call copyVideoTextureToPlatformTexture first,
     1507    // which calls updateLastPixelBuffer, which clears m_lastImage whenever the
     1508    // video delivers a new frame. This breaks videoOutputHasAvailableFrame's
     1509    // short-circuiting when m_lastImage is non-null, but the video often
     1510    // doesn't have a new frame to deliver since the last time
     1511    // hasNewPixelBufferForItemTime was called against m_videoOutput. To avoid
     1512    // changing the semantics of videoOutputHasAvailableFrame in ways that might
     1513    // break other callers, look for production of a recent pixel buffer from
     1514    // the video output, too.
     1515    if (videoOutputHasAvailableFrame() || (m_videoOutput && m_lastPixelBuffer))
    15021516        paintWithVideoOutput(context, rect);
    15031517    else
     
    22212235void MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput(GraphicsContext& context, const FloatRect& outputRect)
    22222236{
    2223     updateLastImage(UpdateType::UpdateSynchronously);
     2237    // It's crucial to not wait synchronously for the next image. Videos that
     2238    // come down this path are performing slow-case software uploads, and such
     2239    // videos may not return metadata in a timely fashion. Use the most recently
     2240    // available pixel buffer, if any.
     2241    updateLastImage();
    22242242    if (!m_lastImage)
    22252243        return;
Note: See TracChangeset for help on using the changeset viewer.