Bug 147645 - Linear and axial gradients lost in presentation mode if enable Skia with enabled Hardware Acceleration
Summary: Linear and axial gradients lost in presentation mode if enable Skia with enab...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Patrick (volunteer)
URL:
Whiteboard: target:24.2.0 target:7.5.7 target:7.6.1
Keywords: bibisected, bisected, regression
: 147714 151703 (view as bug list)
Depends on:
Blocks: Impress-Gradient Slide-Show Skia
  Show dependency treegraph
 
Reported: 2022-02-24 18:41 UTC by Telesto
Modified: 2023-08-21 16:37 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (11.61 KB, application/vnd.oasis.opendocument.presentation)
2022-02-24 18:41 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2022-02-24 18:41:02 UTC
Description:
Gradient color lost in presentation mode

Steps to Reproduce:
1. Open the attached file
2. Press F5

Actual Results:
Orange screen

Expected Results:
Gradient screen


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2bb10a827ac13d0caf009e8526ccd9f17dc71653
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL Jumbo
Comment 1 Telesto 2022-02-24 18:41:14 UTC
Created attachment 178519 [details]
Example file
Comment 2 Telesto 2022-02-24 18:42:26 UTC
No issue with
Version: 7.2.1.0.0+ (x64) / LibreOffice Community
Build ID: 8fdbb8aed1b48734a717d5f98ada566de7204605
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 3 Julien Nabet 2022-02-24 19:49:39 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this with gtk3, kf5 (cairo+xcb) or gen rendering (x11).

Perhaps Windows or even Skia related (in this last case, if graphic driver is up-to-date, it could be interesting to disable it completely, see https://wiki.documentfoundation.org/QA/FirstSteps#Graphics-related_issues_.28_Skia_.29)
Comment 4 Telesto 2022-02-24 20:39:02 UTC
I'm running Skia/Software (raster) mode.. so it isn't drivers.. it's fine with GDI

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2bb10a827ac13d0caf009e8526ccd9f17dc71653
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL Jumbo
Comment 5 Regina Henschel 2022-02-24 23:09:42 UTC
It happens only with linear and with axial gradient. It does not happen, if the gradient is combined with transparency. It happens only with Skia.

I see the error already in Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 628fedabdd27ad08e9a42f47106864751e493c2c
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL
That is about 15.Jan.2022.
Comment 6 raal 2022-08-14 07:28:27 UTC
bisected to cafb4133f5280a66d0abb6f6953c9e4b32d694c7 is the first bad commit
commit cafb4133f5280a66d0abb6f6953c9e4b32d694c7
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Tue Feb 1 16:20:13 2022 -0800

    source adc2ac31fb2763077e48658756946a39d91c8e12

https://gerrit.libreoffice.org/c/core/+/129298
Comment 7 Stéphane Guillou (stragu) 2022-12-21 23:31:35 UTC
*** Bug 151703 has been marked as a duplicate of this bug. ***
Comment 8 Stéphane Guillou (stragu) 2022-12-22 00:14:36 UTC
*** Bug 147714 has been marked as a duplicate of this bug. ***
Comment 9 V Stuart Foote 2022-12-22 19:23:56 UTC
This is not a Skia 'only' issue. 

See in dupe

https://bugs.documentfoundation.org/show_bug.cgi?id=151703#c4

where in a dual-headed system, shows the gradients get handled differently for each of the three canvas renderings--presentation, next-slide and preview.
 
There are definite issues with the non-Skia rendering of the linear and axial gradients and apparently the quadratic forms. It is just that Skia seems to make them worse and shows during a slide presentation when the presenter console is NOT in use.
Comment 10 Telesto 2022-12-22 20:44:59 UTC
(In reply to V Stuart Foote from comment #9)
> This is not a Skia 'only' issue. 

Well got of track, with duplicates mentioning 'Skia' and comment 3. So bug 152641 might be a duplicate after all..
Comment 11 Rainer Bielefeld Retired 2022-12-23 07:22:37 UTC
I am pretty sure that this one is not Skia, but Hardware Acceleration related:

Follow https://bugs.documentfoundation.org/show_bug.cgi?id=152641#c7 Steps 10-12
Now you have Unchecked Hardware Acc., Anti Alias. and Skia

21. Open Example file, <f5> for Presentation mode
    » Gradient lost                                                😥
22. <Esc>
23. Menu Tools ˋOptions → View → Check both Skia options → [OK] → Restart LibOˊ
24. Open Example file, <f5> for Presentation mode
    » Gradient still lost                                          😥
      SKIA doesn't any change

31. Follow https://bugs.documentfoundation.org/show_bug.cgi?id=152641#c7
     Steps 10-14
    » Hardware Acc. now is active
32.  Open Example file, <f5> for Presentation mode
    » Gradient works fine                                          👌
33. Menu Tools ˋOptions → View → Check both Skia options → [OK] → Restart LibOˊ
34. Open Example file, <f5> for Presentation mode
    » Gradient lost                                                😥
35. Menu Tools ˋOptions → View → Unceck both Skia options → [OK] → Restart LibOˊ
36.  Open Example file, <f5> for Presentation mode
    » Gradient works fine                                          👌

So I currently think that not not Skia is the root of the problem, but that Sika disables Hardware Acceleration..
Also see "Bug 152641 - SLIDESHOW Shape gradient angle not reflected when presenting without active 'Graphics Output Hardware Acceleration"
Comment 12 Commit Notification 2023-08-16 11:48:32 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f6cae6f1b661baafe8a1ac4655765ec49d56317d

tdf#144073 and tdf#147645: use bounds and angle for gradient

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 13 Patrick (volunteer) 2023-08-16 12:13:31 UTC
(In reply to Commit Notification from comment #12)
> Patrick Luby committed a patch related to this issue.
> It has been pushed to "master":
> 
> https://git.libreoffice.org/core/commit/
> f6cae6f1b661baafe8a1ac4655765ec49d56317d
> 
> tdf#144073 and tdf#147645: use bounds and angle for gradient
> 
> It will be available in 24.2.0.
> 

The above fix should be available in tomorrow's (17 August 2023) nightly master build.

Note: I only tested on macOS. I saw the https://bugs.documentfoundation.org/show_bug.cgi?id=147645#c11 comment about hardware acceleration but on macOS, hardware acceleration cannot be enabled so, for macOS, there was only one place in the code that gets used to draw gradients in slideshows.

Can anyone test the fix on Windows or Linux both with and without hardware acceleration enabled?
Comment 14 Commit Notification 2023-08-21 16:37:06 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/6f94daaf7da1c0c380a177f5d7aa06c9a1bfad9b

tdf#144073 and tdf#147645: use bounds and angle for gradient

It will be available in 7.5.7.

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 15 Commit Notification 2023-08-21 16:37:12 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/705566856b647760a2ea3c6a7de9efe4ea1d9e7a

tdf#144073 and tdf#147645: use bounds and angle for gradient

It will be available in 7.6.1.

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.