<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 18, 2015 at 7:27 AM, Albert Astals Cid <span dir="ltr"><<a href="mailto:aacid@kde.org" target="_blank">aacid@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El Divendres, 17 de juliol de 2015, a les 12:52:30, Jeremy Maitin-Shepard va<br>
escriure:<br>
<span>> Forwarding to the list, since I sent my original reply incorrectly...<br>
><br>
</span>> On Fri, Jul 17, 2015 at 12:51 PM, Jeremy Maitin-Shepard <<a href="mailto:jeremy@jeremyms.com" target="_blank">jeremy@jeremyms.com</a><br>
> > wrote:<br>
<span>> ><br>
> > On Thu, Jul 16, 2015 at 3:16 PM, Albert Astals Cid <<a href="mailto:aacid@kde.org" target="_blank">aacid@kde.org</a>> wrote:<br>
> > [snip]<br>
> ><br>
> >> > Any advice about how to deal with this redraw problem?<br>
> >><br>
> >> Trigger the redraw yourself? See Saheeb's branch for optinal content<br>
> >> (origin/gsoc2015_layer_feature), I'd say it probably makes sense for you<br>
> >> to<br>
> >> base your work on his branch.<br>
> ><br>
> > Thanks, I'll take a look.<br></span></blockquote><div><br><br></div><div>I see that the gsoc2015_layer_feature branch just triggers a redraw of every page in the document any time there is any change to optional content group visibility. Merging my changes on top of this branch indeed makes the animation kind of work. However, there are some serious performance issues. Redrawing the whole document for each frame of the animation kills performance if there are many pages. To avoid this though would seem to require poppler providing an interface for determining which pages are affected by each optional content group. (This is needed for a proper implementation of the Javascript OCG interface anyway.) Alternatively a hack might be to redraw only the current page; not sure how this would interoperate with the layer panel.</div><div><br></div><div>Even in single page documents, though, redrawing the whole page is often too slow to achieve reasonable frame rate. Somehow acrobat reader is significantly faster. It would be nice if there were a way to prerender each optional content group individually so that toggling the visibility wouldn't require rerendering.<br></div><br></div></div></div>