Bug 130655 - Dashed line geometry improvements
Summary: Dashed line geometry improvements
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:7.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-14 11:23 UTC by Armin Le Grand (allotropia)
Modified: 2024-04-09 16:52 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Armin Le Grand (allotropia) 2020-02-14 11:23:53 UTC
Usage of basegfx::utils::applyLineDashing can be expensive and mem-usage-intense. Improve those criterias and make runtime usage more safe
Comment 1 Armin Le Grand (allotropia) 2020-02-14 11:24:28 UTC
Grepping immediately...
Comment 2 Armin Le Grand (allotropia) 2020-02-14 11:29:15 UTC
applyLineDashing does check for 0.0 as length of line pattern, but not for short usages that may lead to an increased amount of snippets and thus to bad runtime/mem/ressource usage. There are two things I have in mind:

(1) change interface to offer this method as kind of 'pipe' access so that the data will not be collected but callbacks are used - to avoid big data chunks being created just for in-between usage and data pass back

(2) pre-calculate the to be expected amount of snippets and limit these. Add in these cases a e.g. scaled line pattern to get the line dashed inside that limit, plus add a warning if this is done, with the hint to change the caller to use the callback mechanism if possible
Comment 3 Armin Le Grand (allotropia) 2020-02-14 15:45:10 UTC
(1) done by 0dc4fddb9c76a3f4682eca4059b42a079e74e735
Comment 4 Commit Notification 2020-02-14 15:45:47 UTC
Armin Le Grand (Collabora) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0dc4fddb9c76a3f4682eca4059b42a079e74e735

tdf#130655 added callback interface to ::applyLineDashing

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Armin Le Grand (allotropia) 2020-02-14 18:20:29 UTC
(2) and (1) for 3D done by 62ac8333999c661432adb0a18245a399daa89dcb
Comment 6 Commit Notification 2020-02-14 18:20:29 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/62ac8333999c661432adb0a18245a399daa89dcb

tdf#130655 callback interface for 3D and secure dash

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Armin Le Grand (allotropia) 2020-02-14 18:32:41 UTC
This is done, now I'll test to use that callback stuff where it would make sense...
Comment 8 Xisco Faulí 2020-07-22 15:20:25 UTC
Dear Armin Le Grand,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.