Bug 118471

Summary: [texmap][GStreamer] upload onto the texture only the buffer to be painted
Product: WebKit Reporter: Víctor M. Jáquez L. <vjaquez>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, benjamin, cgarcia, cmarcelo, commit-queue, eric.carlson, glenn, gustavo, jer.noble, luiz, menard, mrobinson, noam, pnormand, rwlbuis
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 118253    
Attachments:
Description Flags
Patch none

Description Víctor M. Jáquez L. 2013-07-08 07:19:01 PDT
Right now all the buffers are uploaded onto the the texture, that creates situations where the unpainted buffers are uploaded. This patch changes the logic to upload only the buffers that are going to be shown.
Comment 1 Víctor M. Jáquez L. 2013-07-09 09:09:20 PDT
Created attachment 206326 [details]
Patch
Comment 2 Carlos Garcia Campos 2013-07-09 11:52:54 PDT
Comment on attachment 206326 [details]
Patch

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

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:371
> +    gst_buffer_map(m_buffer, &srcInfo, GST_MAP_READ);

Would it make sense or have any benefit to use gst_video_frame_map/unmap?

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:384
> +    return texture;

This returns a PassRefPtr now, so this should return texture.release() to transfer the ownership to the caller.
Comment 3 Carlos Garcia Campos 2013-07-10 00:15:20 PDT
(In reply to comment #2)
> (From update of attachment 206326 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=206326&action=review
> 
> > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:371
> > +    gst_buffer_map(m_buffer, &srcInfo, GST_MAP_READ);
> 
> Would it make sense or have any benefit to use gst_video_frame_map/unmap?
> 
> > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:384
> > +    return texture;
> 
> This returns a PassRefPtr now, so this should return texture.release() to transfer the ownership to the caller.

I'm wrong, the texture is not created here and passed to the caller, but fetched from the pool, so this is correct, sorry.
Comment 4 Víctor M. Jáquez L. 2013-07-10 03:27:41 PDT
Comment on attachment 206326 [details]
Patch

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

>>> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:371
>>> +    gst_buffer_map(m_buffer, &srcInfo, GST_MAP_READ);
>> 
>> Would it make sense or have any benefit to use gst_video_frame_map/unmap?
> 
> I'm wrong, the texture is not created here and passed to the caller, but fetched from the pool, so this is correct, sorry.

about using gst_frame_map/unmap, currently it doesn't bring any benefit, since the metadata is extracted from the caps using the method getVideoSizeAndFormatFromCaps(), delaying the map() operation until is truly needed.
Comment 5 WebKit Commit Bot 2013-07-16 03:15:50 PDT
Comment on attachment 206326 [details]
Patch

Clearing flags on attachment: 206326

Committed r152711: <http://trac.webkit.org/changeset/152711>
Comment 6 WebKit Commit Bot 2013-07-16 03:15:55 PDT
All reviewed patches have been landed.  Closing bug.