Bug 173410 - [GStreamer] fast/canvas/canvas-createPattern-video-loading.html is failing since r218170
Summary: [GStreamer] fast/canvas/canvas-createPattern-video-loading.html is failing si...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords:
Depends on:
Blocks: 172427
  Show dependency treegraph
 
Reported: 2017-06-15 04:56 PDT by Miguel Gomez
Modified: 2021-04-09 02:30 PDT (History)
17 users (show)

See Also:


Attachments
Patch (4.95 KB, patch)
2021-04-03 10:16 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Gomez 2017-06-15 04:56:58 PDT
fast/canvas/canvas-createPattern-video-loading.html [ Failure ]
Comment 1 Ms2ger (he/him; ⌚ UTC+1/+2) 2017-08-10 05:28:03 PDT
The test fails because drawImageToCanvasAndCheckPixels only find transparent black on the canvas when called from the "playing" callback.

The issue is that MediaPlayerPrivateGStreamerBase::m_sample is set to nullptr in the newly added flushCurrentBuffer() method, called in response to a GST_EVENT_FLUSH_START event. The paint() method then returns early because GST_IS_SAMPLE(m_sample.get()) is false, and the CanvasPattern ends up transparent black.
Comment 3 Claudio Saavedra 2018-02-02 06:49:29 PST
Ah, sorry. Different test. :/
Comment 4 Philippe Normand 2018-02-28 02:13:50 PST
(In reply to Ms2ger from comment #1)
> The test fails because drawImageToCanvasAndCheckPixels only find transparent
> black on the canvas when called from the "playing" callback.
> 
> The issue is that MediaPlayerPrivateGStreamerBase::m_sample is set to
> nullptr in the newly added flushCurrentBuffer() method, called in response
> to a GST_EVENT_FLUSH_START event. The paint() method then returns early
> because GST_IS_SAMPLE(m_sample.get()) is false, and the CanvasPattern ends
> up transparent black.

Yes and because no texture copy is done when flushing the sample. The             m_platformLayerProxy->dropCurrentBufferWhilePreservingTexture() call has no effect, because it's done outside of the texturemapper code path.
Comment 5 Philippe Normand 2021-04-03 10:16:44 PDT
Created attachment 425097 [details]
Patch
Comment 6 EWS 2021-04-09 02:29:58 PDT
Committed r275755 (236333@main): <https://commits.webkit.org/236333@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425097 [details].