Bug 160193 - Text visual artefact during object animation if object behind the text
Summary: Text visual artefact during object animation if object behind the text
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Object-Animations
  Show dependency treegraph
 
Reported: 2024-03-14 01:50 UTC by Stéphane Guillou (stragu)
Modified: 2024-03-27 12:19 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
sample ODP (7.33 MB, application/vnd.oasis.opendocument.presentation)
2024-03-14 01:50 UTC, Stéphane Guillou (stragu)
Details
minimal ODP sample (12.73 KB, application/vnd.oasis.opendocument.presentation)
2024-03-14 01:53 UTC, Stéphane Guillou (stragu)
Details
screenshot of issue (46.68 KB, image/png)
2024-03-14 02:53 UTC, Stéphane Guillou (stragu)
Details
minimal ODP sample, shows difference between object in front and behind text (15.27 KB, application/vnd.oasis.opendocument.presentation)
2024-03-14 03:13 UTC, Stéphane Guillou (stragu)
Details
what I see in X11 (798.78 KB, video/webm)
2024-03-14 09:46 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2024-03-14 01:50:29 UTC
Created attachment 193099 [details]
sample ODP

Steps:
1. Open attachment
2. Start presentation (F5)
3. Go through slides
Result: some slight visual artefact during swipe animation on both slides, where text is visible before it should, and previous slide's artefact is carried over to the second slide.
Also reproduced when playing animation on canvas.

Using libcairo2 version 1.16.0-5ubuntu2 on Ubuntu 22.04 and:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f42363c51672a5b3685b0b9b11e932680530dce3
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Same with gen VCL plugin.
No issue with kf5 (cairo+xcb) nor (cairo+wayland)

Unticking "Use hardware acceleration" in "Tools > Options > View" solves the issue.

Bibisected with linux-64-7.0 repository to first bad build [302a4ceaabac898c580c71659800d767595cd0c8] which points to:

commit 770892a387361067d23ab08ed38690c50b8b9395
author	Caolán McNamara 	Sat May 23 20:21:59 2020 +0100
committer	Caolán McNamara 	Sun May 24 20:20:54 2020 +0200
platforms using the cairo canvas use cairo for text rendering already
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94736

Caolán, can you please have a look?
Comment 1 Stéphane Guillou (stragu) 2024-03-14 01:53:35 UTC Comment hidden (obsolete)
Comment 2 Stéphane Guillou (stragu) 2024-03-14 02:53:27 UTC
Created attachment 193101 [details]
screenshot of issue
Comment 3 Stéphane Guillou (stragu) 2024-03-14 03:13:52 UTC
Created attachment 193102 [details]
minimal ODP sample, shows difference between object in front and behind text

(In reply to Stéphane Guillou (stragu) from comment #0)
> [...] and previous slide's artefact is carried over to the second slide.
Sorry, scrap that bit: the template this is based on had duplicated text boxes left over in the second slide. No "carrying over" between slides.

Issue happens with any animation.

It turns out the issue depends on the position of the animated object, relative to the text. Artefacts only appear on text that is in front of the object.
Comment 4 Caolán McNamara 2024-03-14 09:33:37 UTC
"No issue with kf5 (cairo+xcb) nor (cairo+wayland)" does that mean it works with the gtk3 under wayland case, but not gtk3 under x11?
Comment 5 Caolán McNamara 2024-03-14 09:46:22 UTC
Created attachment 193109 [details]
what I see in X11

I seem to see the same thing in X11 and Wayland, and seems the same if I disable "hardware acceleration" which in this context means using the vcl backend for full-screen presentations vs a cairo backend (though amusingly at this point both are backed by cairo)

If it was an X-only issue I wonder if there could be any connection to the (mystery) bug 117413 which has a workaround in vcl/unx/generic/gdi/cairotextrender.cxx syncCairoContext

If reproducible checking if changing:
if (cairo_surface_get_type(target) == CAIRO_SURFACE_TYPE_XLIB)
to
if (true)
there has any sort of an effect
Comment 6 Stéphane Guillou (stragu) 2024-03-27 12:17:33 UTC
(In reply to Caolán McNamara from comment #4)
> "No issue with kf5 (cairo+xcb) nor (cairo+wayland)" does that mean it works
> with the gtk3 under wayland case, but not gtk3 under x11?
I see the issue with gtk3 under Wayland as well as X11.

I don't see the grey rectangle you get in your video. The artefact I describe is the ghostly, greenish text in the white during the second animation.

Building now with you suggestion.
Comment 7 Stéphane Guillou (stragu) 2024-03-27 12:19:10 UTC
(In reply to Caolán McNamara from comment #5)
> If reproducible checking if changing:
> if (cairo_surface_get_type(target) == CAIRO_SURFACE_TYPE_XLIB)
> to
> if (true)
> there has any sort of an effect
No difference with this in place.