Bug 118471 - [texmap][GStreamer] upload onto the texture only the buffer to be painted
Summary: [texmap][GStreamer] upload onto the texture only the buffer to be painted
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 118253
  Show dependency treegraph
 
Reported: 2013-07-08 07:19 PDT by Víctor M. Jáquez L.
Modified: 2013-07-16 03:15 PDT (History)
15 users (show)

See Also:


Attachments
Patch (9.55 KB, patch)
2013-07-09 09:09 PDT, Víctor M. Jáquez L.
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.