<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:krh@bitplanet.net" title="Kristian Høgsberg <krh@bitplanet.net>"> <span class="fn">Kristian Høgsberg</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTABUG - Protocol: wl_buffer.release is racy"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=75303">bug 75303</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>NOTABUG
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTABUG - Protocol: wl_buffer.release is racy"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=75303#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED NOTABUG - Protocol: wl_buffer.release is racy"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=75303">bug 75303</a>
              from <span class="vcard"><a class="email" href="mailto:krh@bitplanet.net" title="Kristian Høgsberg <krh@bitplanet.net>"> <span class="fn">Kristian Høgsberg</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=75303#c0">comment #0</a>)
<span class="quote">> Consider a client doing this:
> 1. surface1.attach(buffer1)
> 2. surface1.commit
> 3. surface2.attach(buffer1)
> 4. surface2.commit

> Then the client receives buffer1.release.

> It is ambiguous, whether the release corresponds to step 2 or step 4. That
> is, the client cannot know if the latter commit still holds the buffer
> reserved in the server. The server may have had time to process and release
> the buffer before step 4, in which case the buffer would be reserved again
> after step 4.

> The problem is the same also, if surface1 and surface2 were both just
> surface1. If the compositor has time to repaint in between the commits, the
> client may get a release it most likely interprets as the release
> corresponding to step 4, which would be wrong.

> How should this be resolved?

> A suggestion from Jason Ekstrand was to modify the protocol to guarantee one
> release event for each commit that makes the buffer reserved. This would
> allow clients to use simple reference counting.</span >

We do that now.  Every attach+commit is followed by a release.  If a client
attaches a buffer to two surfaces, it needs to receive two release events
before it can use the buffer again without causing artifacts.</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>