Bug 157086 - Part of the logo is white
Summary: Part of the logo is white
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Patrick Luby (volunteer)
URL:
Whiteboard: target:24.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2023-09-04 11:39 UTC by Xisco Faulí
Modified: 2023-10-31 16:37 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Impress document with LibreOffice about.svg (379.57 KB, application/vnd.oasis.opendocument.presentation)
2023-10-11 14:26 UTC, Patrick Luby (volunteer)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2023-09-04 11:39:55 UTC
Steps to reproduce:
1. Clean user profile
2. Launch LibreOffice

See attachment 189335 [details] from bug 157083 to see the problem

Reproduced in

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 871cb4048ec50ea9970269c34c1dd71ce6d27a13
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: x11
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2023-09-04 11:40:36 UTC
Regression introduced by

author	Noel Grandin <noel.grandin@collabora.co.uk>	2023-08-28 14:19:58 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2023-08-28 18:14:59 +0200
commit e9dfa816f7002c686ad155682a21a06ec6041b5f (patch)
tree 37f05cb9da44cf631bbbcf9851e713b4fa9b0fd4
parent b7d5b8cee77e4cfd931cdbd6f4ba8673c6bbe490 (diff)
tdf#156808 soft edge effect makes image (except for soft edge) disappear

Bisected with: bibisect-linux64-24.2

Adding Cc: to Noel Grandin
Comment 2 Patrick Luby (volunteer) 2023-09-11 14:45:22 UTC
I can reproduce this my local master build on macOS with Skia/Metal, Skia/Raster, and Skia disabled.

Version: 24.2.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: c95adc14d98123357b05721dbbfeb2fe48f2d3b8
CPU threads: 8; OS: Mac OS X 12.6.8; UI render: Skia/Raster; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Maybe a possible fix is to call aMask.Invert() a second time after it has been used?
Comment 3 Noel Grandin 2023-09-12 14:25:25 UTC
I have just constructed a unit test that verifies that SoftEdgePrimitive2D on master is doing the same thing as before commit 81994cb2b8b32453a92bcb011830fcb884f22ff3 "Convert internal vcl bitmap formats transparency->alpha (II)", so likely the problem started with that commit somehow.

Hmmm.
Comment 4 Patrick Luby (volunteer) 2023-09-12 14:56:38 UTC
I have submitted the following patch that I think fixes this bug without causing https://bugs.documentfoundation.org/show_bug.cgi?id=156808 to reoccur:

https://gerrit.libreoffice.org/c/core/+/156854

There is still some unexpected behavior with soft edges when running Skia/Raster and Skia disabled in https://bugs.documentfoundation.org/show_bug.cgi?id=156808 so I might still need to make additional changes.
Comment 5 Commit Notification 2023-09-12 18:51:58 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/798de29936b9a0c618bd31629936a4c836429e90

tdf#157086 invert the blur mask instead of the alpha mask

It will be available in 24.2.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 6 Patrick Luby (volunteer) 2023-09-12 18:53:30 UTC
My fix should be in tomorrow's (13 September 2023) nightly master build.
Comment 7 Xisco Faulí 2023-09-13 07:34:19 UTC
Verified in

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fb07dcf993bd3ff7880b26414e4095560c296d8b
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

@Patrick, Thanks for fixing this issue!
Comment 8 Gerald Pfeifer 2023-09-13 12:02:45 UTC
Indeed, thank you, @Patrick!


@Patrick and @Xisco, I have to admit I am nervous about the number
of recent regressions in this area. Any chance there can be testcases
for this change (and maybe others)?
Comment 9 Patrick Luby (volunteer) 2023-10-11 14:26:16 UTC
Created attachment 190138 [details]
Sample Impress document with LibreOffice about.svg
Comment 10 Patrick Luby (volunteer) 2023-10-11 14:30:32 UTC
Reopening as I noticed that the white areas in the LibreOffice about.svg have reappeared in master (at least on macOS).

This time though, the white areas only appear when exporting to PDF with Skia/Metal or Skia/Raster. All other drawing paths work fine and exporting to PDF with Skia disabled also works fine so this latest behavior is a "Skia only" bug.
Comment 11 Timur 2023-10-31 15:56:59 UTC
IIUC, as I did not test, this was fixed and then something reappeared - but if not because of the same commit, then it needs a separate bug. This one was marked regression to specific commit.
Comment 12 Patrick Luby (volunteer) 2023-10-31 16:37:09 UTC
(In reply to Timur from comment #11)
> IIUC, as I did not test, this was fixed and then something reappeared - but
> if not because of the same commit, then it needs a separate bug. This one
> was marked regression to specific commit.

No problem. I have created the following new bug:

https://bugs.documentfoundation.org/show_bug.cgi?id=158014