<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ScalableImageDecoder should be using SharedBuffer instead of DataSegment"
   href="https://bugs.webkit.org/show_bug.cgi?id=233441">233441</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ScalableImageDecoder should be using SharedBuffer instead of DataSegment
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Images
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned@lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jean-yves.avenard@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>sabouhallawa@apple.com
          </td>
        </tr>

        <tr>
          <th>Depends on</th>
          <td>233030
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In <a href="https://trac.webkit.org/changeset/251836/webkit">https://trac.webkit.org/changeset/251836/webkit</a> DataSegment was used over SharedBuffer because SharedBuffer didn't use thread-safe refcounting.

However, since <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - REGRESSION (r282865?): ASSERTION FAILED: Unsafe to ref/deref from different threads m_isOwnedByMainThread == isMainThread() (230644)"
   href="show_bug.cgi?id=230662">bug 230662</a>, this is no longer the case.

Once <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Distinguish contiguous SharedBuffer from non-contiguous one and guarantee immutability"
   href="show_bug.cgi?id=233030">bug 233030</a> lands, SharedBuffer becomes immutable once created and can be shared across threads.

ScalableImageDecoder currently takes a SharedBuffer, flatten it through the call to SharedBuffer::data() and then take a reference to the inner DataSegment.

ScalableImageDecoder should be re-written to use SharedBuffer so that we can do without the copy/memory allocation required by the flattening of the SharedBuffer.</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Distinguish contiguous SharedBuffer from non-contiguous one and guarantee immutability"
   href="https://bugs.webkit.org/show_bug.cgi?id=233030">Bug 233030</a>] Distinguish contiguous SharedBuffer from non-contiguous one and guarantee immutability
              </li>
          </ul>
        </div>
        <br>

      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>