<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:haxtibal@posteo.de" title="Tobias Deiminger <haxtibal@posteo.de>"> <span class="fn">Tobias Deiminger</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Render a single annotation with Qt5 frontend"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105796">bug 105796</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;">Attachment #138409 is obsolete</td>
           <td>
                
           </td>
           <td>1
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Render a single annotation with Qt5 frontend"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105796#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Render a single annotation with Qt5 frontend"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105796">bug 105796</a>
              from <span class="vcard"><a class="email" href="mailto:haxtibal@posteo.de" title="Tobias Deiminger <haxtibal@posteo.de>"> <span class="fn">Tobias Deiminger</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=139252" name="attach_139252" title="New API: Add Annotation::renderToImage to Qt5 frontend (rev 2)">attachment 139252</a> <a href="attachment.cgi?id=139252&action=edit" title="New API: Add Annotation::renderToImage to Qt5 frontend (rev 2)">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=105796&attachment=139252'>[review]</a>
New API: Add Annotation::renderToImage to Qt5 frontend (rev 2)

Add copyXRef option to PDFDoc::displayAnnot for thread safety.

It took me while to figure out what the copyXRef argument in Page::displaySlice
is about. Commit 8eb489c355d734a72e140ce7e32470d048362499 and <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - library should be thread-safe"
   href="show_bug.cgi?id=50992">bug #50992</a>
explain it. Now I do something similar for PDFDoc::displayAnnot. Arthur gets
copyXRef=gFalse (i.e. no thread safety), because QT restricts painting to the
main thread anyway.

Sidenotes:
* Maybe we should add a few comments or documentation, to explain copyXRef in
Page::displaySlice?
* In Page::displaySlice the Page object and relevant members are temporarily
pointed to a XRef copy, and Gfx is constructed with that copy. When Annot::draw
is called, the Annot object is supposed to use the passed gfx->getXRef instead
of member Annot::xref. Only gfx->getXRef points to the copy. When working on
Annot, imho it's not obvious that only gfx->getXRef is thread safe and
therefore that's not newbie-safe:)

Rebased on patch2_reusable_render_setup_r2.patch.

(Sorry, I messed up the "obsoletes" checkboxes, now patch3-rev2 obsoletes
patch2-rev1, and patch2-rev2 obsoletes patch3-rev1. Should have been the other
way round.)</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>