-
László Németh yazdı
When an unloaded linked picture comes into the visible view (including repainting a page), SwNoTextFrm::PaintPicture() starts a thread to load it in the background using the TriggerAsyncRetrieveInputStream() method of the graphic node. To avoid to start a second thread on the same graphic node, TriggerAsyncRetrieveInputStream() checks mpThreadConsumer, the graphic node member variable for the possible thread object. The problem is that when the thread finished and SwGrfNode::UpdateLinkWithInputStream() reset mpThreadConsumer, the graphic object of the graphic node is still in unloaded state (its type is GRAPHIC_DEFAULT or GRAPHIC_NONE instead of GRAPHIC_BITMAP or GRAPHIC_GDIMETAFILE) for a while, because its modification is solved asynchronously after several SvFileObject::GetData() calls. In the intermediate state of the graphic object, with the high priority repaints of the new scheduler, PaintPicture() could start new thread to load the image again. Using the new member variable SwGrfNode::mbUpdateLinkInProgress, this patch will prevent the graphic node to start newer thread unnecessarily. Change-Id: I9433f0fa4613294103a00a3955fc2f35d8863b59 Reviewed-on: https://gerrit.libreoffice.org/19974Reviewed-by:
Michael Meeks <michael.meeks@collabora.com> Reviewed-by:
Andras Timar <andras.timar@collabora.com> Tested-by:
Andras Timar <andras.timar@collabora.com>
945da612