⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 275755 in webkit


Ignore:
Timestamp:
Apr 9, 2021, 2:29:51 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[GStreamer] fast/canvas/canvas-createPattern-video-loading.html is failing since r218170
https://bugs.webkit.org/show_bug.cgi?id=173410

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-09
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

When a flush has been requested by the GL video sink, allocate a new copy of the sample
which has to be released. The copy is necessary so that the video dimensions can still be
fetched and also for canvas rendering. The release is necessary because the sample might
have been allocated by a hardware decoder and memory might have to be reclaimed by a
non-sysmem buffer pool.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::flushCurrentBuffer):
(WebCore::MediaPlayerPrivateGStreamer::paint):

LayoutTests:

  • platform/gtk/TestExpectations: Unflag now-passing test.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r275752 r275755  
     12021-04-09  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] fast/canvas/canvas-createPattern-video-loading.html is failing since r218170
     4        https://bugs.webkit.org/show_bug.cgi?id=173410
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        * platform/gtk/TestExpectations: Unflag now-passing test.
     9
    1102021-04-09  Antoine Quint  <graouts@webkit.org>
    211
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r275548 r275755  
    22132213webkit.org/b/172811 fast/forms/number/number-appearance-spinbutton-layer.html [ Failure ]
    22142214
    2215 webkit.org/b/173410 fast/canvas/canvas-createPattern-video-loading.html [ Failure ]
    2216 
    22172215webkit.org/b/173413 imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-after-content-change.html [ Failure ]
    22182216
  • trunk/Source/WebCore/ChangeLog

    r275754 r275755  
     12021-04-09  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] fast/canvas/canvas-createPattern-video-loading.html is failing since r218170
     4        https://bugs.webkit.org/show_bug.cgi?id=173410
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        When a flush has been requested by the GL video sink, allocate a new copy of the sample
     9        which has to be released. The copy is necessary so that the video dimensions can still be
     10        fetched and also for canvas rendering. The release is necessary because the sample might
     11        have been allocated by a hardware decoder and memory might have to be reclaimed by a
     12        non-sysmem buffer pool.
     13
     14        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     15        (WebCore::MediaPlayerPrivateGStreamer::flushCurrentBuffer):
     16        (WebCore::MediaPlayerPrivateGStreamer::paint):
     17
    1182021-04-09  Ziran Sun  <zsun@igalia.com>
    219
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r275600 r275755  
    31613161
    31623162    if (m_sample) {
    3163         // Replace by a new sample having only the caps, so this dummy sample is still useful to get the dimensions.
    3164         // This prevents resizing problems when the video changes its quality and a DRAIN is performed.
     3163        // Allocate a new copy of the sample which has to be released. The copy is necessary so that
     3164        // the video dimensions can still be fetched and also for canvas rendering. The release is
     3165        // necessary because the sample might have been allocated by a hardware decoder and memory
     3166        // might have to be reclaimed by a non-sysmem buffer pool.
    31653167        const GstStructure* info = gst_sample_get_info(m_sample.get());
    3166         m_sample = adoptGRef(gst_sample_new(nullptr, gst_sample_get_caps(m_sample.get()),
     3168        auto buffer = adoptGRef(gst_buffer_copy_deep(gst_sample_get_buffer(m_sample.get())));
     3169        m_sample = adoptGRef(gst_sample_new(buffer.get(), gst_sample_get_caps(m_sample.get()),
    31673170            gst_sample_get_segment(m_sample.get()), info ? gst_structure_copy(info) : nullptr));
    31683171    }
     
    32533256        return;
    32543257
    3255     context.drawImage(gstImage->image(), rect, gstImage->rect(), { CompositeOperator::Copy, m_canRenderingBeAccelerated ? m_videoSourceOrientation : ImageOrientation() });
     3258    context.drawImage(gstImage->image(), rect, gstImage->rect(), { CompositeOperator::Copy, m_shouldHandleOrientationTags ? m_videoSourceOrientation : ImageOrientation() });
    32563259}
    32573260
Note: See TracChangeset for help on using the changeset viewer.