<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Painting a video into a canvas doesn't work when accelerated compositing is enabled"
   href="https://bugs.webkit.org/show_bug.cgi?id=159405#c19">Comment # 19</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Painting a video into a canvas doesn't work when accelerated compositing is enabled"
   href="https://bugs.webkit.org/show_bug.cgi?id=159405">bug 159405</a>
              from <span class="vcard"><a class="email" href="mailto:magomez&#64;igalia.com" title="Miguel Gomez &lt;magomez&#64;igalia.com&gt;"> <span class="fn">Miguel Gomez</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=159405#c18">comment #18</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=282885&amp;action=diff" name="attach_282885" title="Patch">attachment 282885</a> <a href="attachment.cgi?id=282885&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=282885&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=282885&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:733
&gt; &gt; +    // Ensure that we destroy the surface before unmapping the video frame.
&gt; &gt; +    surface.release();
&gt; 
&gt; release() leaks the surface, it doesn't destroy it. What you want is
&gt; 
&gt; surface = nullptr;</span >

Ooops

<span class="quote">&gt; but I'm not sure this is enough, though. I don't know why it's needed to
&gt; destroy the surface before unmapping the frame, but the cairo context owns a
&gt; reference to the surface , so even if you clear the smart pointer the
&gt; surface will still be alive.</span >

I wanna destroy the surface created from the video frame texture before the frame unmapping because once the frame is unmapped that texture can be freed/reused by the gstreamer bin.
Curiously this isn't checked in the current code, just returning the video frame surface. I wonder if I'm being too careful.
Ok, I'll keep it as in the original code, where the surface is not destroyed.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>