Bug 92194 - headless renderer not doing mask based clipping ...
Summary: headless renderer not doing mask based clipping ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.0.0.0.beta1
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0 target:5.0.0.2
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-19 22:04 UTC by Michael Meeks
Modified: 2016-10-25 19:23 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Gradient test document (8.96 KB, application/vnd.oasis.opendocument.text)
2015-06-19 22:04 UTC, Michael Meeks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2015-06-19 22:04:12 UTC
The attached document relies on 1x bit mask clipping to ensure the gradient is contained within the shape from the drawinglayer:

#5  0x00007fffe05ab768 in drawinglayer::impBufferDevice::paint (this=0x7fffffff84f0, fTrans=0) at /data/opt/libreoffice/master/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx:336
#6  0x00007fffe05c4226 in drawinglayer::processor2d::VclProcessor2D::RenderMaskPrimitive2DPixel (this=0x1a4d070, rMaskCandidate=...) at /data/opt/libreoffice/master/drawinglayer/source/processor2d/vclprocessor2d.cxx:910

Unfortunately the headless backend mangles the palette of the bitmap by mis-allocating the colors; a trivial fix but horrible to find chasing through basebmp. The use of uninitialized data to provide the palette colors being rather unfortunate ;-)

Thankfully an easy fix.
Comment 1 Michael Meeks 2015-06-19 22:04:42 UTC
Created attachment 116665 [details]
Gradient test document
Comment 2 Michael Meeks 2015-06-19 22:11:03 UTC
Ancient bug - amazing really ;-) pushed fix to gerrit:

https://gerrit.libreoffice.org/16382
Comment 3 Commit Notification 2015-06-20 09:08:13 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b1b8419d34379dcca31e85ca78957fcf1656b178

tdf#92194 - fix headless masking operations in vcl.

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2015-06-20 11:11:16 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=88b77c0b1866db0d729cc2c15b5d8d4f01e9630d&h=libreoffice-5-0

tdf#92194 - fix headless masking operations in vcl.

It will be available in 5.0.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.