Bug 221391 - [CoordinatedGraphics] The whole content is unnecessarily repainted by animations in non-AC mode pages
Summary: [CoordinatedGraphics] The whole content is unnecessarily repainted by animati...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
: 222026 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-03 23:48 PST by Fujii Hironori
Modified: 2021-02-23 11:55 PST (History)
14 users (show)

See Also:


Attachments
debug-logging.patch (711 bytes, patch)
2021-02-03 23:48 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
test case (21 bytes, text/html)
2021-02-03 23:49 PST, Fujii Hironori
no flags Details
WIP patch (677 bytes, patch)
2021-02-03 23:49 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
WIP patch (1.47 KB, patch)
2021-02-04 15:57 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (3.14 KB, patch)
2021-02-04 16:46 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (5.78 KB, patch)
2021-02-16 23:21 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (5.62 KB, patch)
2021-02-17 20:33 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (5.90 KB, patch)
2021-02-18 23:39 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2021-02-03 23:48:34 PST
Created attachment 419250 [details]
debug-logging.patch

[CoordinatedGraphics] The whole content is unnecessarily repainted by animations

1. Apply the debug logging patch and build GTK port
2. Start GTK MiniBrowser
3. Open the test content
4. the log indicates that the whole content is unnecessarily repainted
Comment 1 Fujii Hironori 2021-02-03 23:49:06 PST
Created attachment 419252 [details]
test case
Comment 2 Fujii Hironori 2021-02-03 23:49:55 PST
Created attachment 419253 [details]
WIP patch
Comment 3 Fujii Hironori 2021-02-04 12:08:26 PST
Comment on attachment 419253 [details]
WIP patch

With this patch, layer animations don't work if AC mode is disabled.
For example,
https://webkit.org/
https://webkit.org/blog-files/3d-transforms/morphing-cubes.html
Comment 4 Fujii Hironori 2021-02-04 12:19:51 PST
How can I know the dirty area for layer animations?
GTK, PlayStation and WinCairo ports are still supporting non-AC mode for WebKit2.
If AC is disabled, the dirty area should be notified by using WebChromeClient::invalidateContentsAndRootView.
Comment 5 Fujii Hironori 2021-02-04 12:54:50 PST
Another example of a layer animation:
attachment#409968 [details]

This animation doesn't work if AC is disabled even without the WIP patch.
Comment 6 Fujii Hironori 2021-02-04 15:57:08 PST
Created attachment 419331 [details]
WIP patch
Comment 7 Fujii Hironori 2021-02-04 16:46:38 PST
Created attachment 419339 [details]
Patch
Comment 8 EWS 2021-02-07 12:25:29 PST
Committed r272476: <https://commits.webkit.org/r272476>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 419339 [details].
Comment 9 Radar WebKit Bug Importer 2021-02-10 14:43:06 PST
<rdar://problem/74207093>
Comment 10 Fujii Hironori 2021-02-16 22:17:00 PST
Committed r272986 (234189@main): <https://commits.webkit.org/234189@main>
Comment 11 Fujii Hironori 2021-02-16 22:18:42 PST
*** Bug 222026 has been marked as a duplicate of this bug. ***
Comment 12 Fujii Hironori 2021-02-16 22:20:20 PST
GTK port was crashing since r272476 (See Bug 222026 for detail). r272986 reverted r272476.  Reopened.
Comment 13 Fujii Hironori 2021-02-16 23:21:32 PST
Created attachment 420603 [details]
Patch
Comment 14 Lauro Moura 2021-02-17 05:58:58 PST
(In reply to Fujii Hironori from comment #13)
> Created attachment 420603 [details]
> Patch

Tested locally and this version indeed does not trigger the crash reported in bug222026.
Comment 15 Fujii Hironori 2021-02-17 12:11:58 PST
Committed r273019 (234220@main): <https://commits.webkit.org/234220@main>
Comment 16 Fujii Hironori 2021-02-17 17:47:11 PST
Committed r273054 (234252@main): <https://commits.webkit.org/234252@main>
Comment 17 Fujii Hironori 2021-02-17 17:54:42 PST
some tests were timing out after r273019.
https://build.webkit.org/#/builders/57/builds/178
r273054 reverted r273019. Reopended.
Comment 18 Fujii Hironori 2021-02-17 20:10:11 PST
(In reply to Fujii Hironori from comment #17)
> some tests were timing out after r273019.

requestAnimationFrame didn't work because m_dirtyRegion.isEmpty() is true.
If DrawingAreaCoordinatedGraphics::triggerRenderingUpdate is called, DrawingAreaCoordinatedGraphics::display must be called.

LayerTreeHost has m_scheduledWhileWaitingForRenderer.
I think DrawingAreaCoordinatedGraphics also should have a flag (e.g. m_scheduledWhileWaitingForDidUpdate) for the same purpose.
Comment 19 Fujii Hironori 2021-02-17 20:33:36 PST
Created attachment 420790 [details]
Patch
Comment 20 Fujii Hironori 2021-02-17 21:49:09 PST
Comment on attachment 420790 [details]
Patch

Clearing flags on attachment: 420790

Committed r273063 (234261@main): <https://commits.webkit.org/234261@main>
Comment 21 Fujii Hironori 2021-02-17 21:49:15 PST
All reviewed patches have been landed.  Closing bug.
Comment 22 Fujii Hironori 2021-02-18 12:37:15 PST
It seems that r273063 added another timing out for GTK Debug.
However, because GTK Debug was exiting early even without my patch, it's difficult to compare.
GTK Release layout tests look fine even after r273063.
I'm going to revert my patch again, and reland my patch after fixing other crashing and timeout bugs.
Comment 23 Fujii Hironori 2021-02-18 12:47:16 PST
Committed r273095 (234293@main): <https://commits.webkit.org/234293@main>
Comment 24 Fujii Hironori 2021-02-18 13:00:56 PST
r273095 reverted r273063. Reopened.
Comment 25 Fujii Hironori 2021-02-18 23:39:07 PST
Created attachment 420928 [details]
Patch
Comment 26 Fujii Hironori 2021-02-23 11:55:45 PST
Comment on attachment 420928 [details]
Patch

Clearing flags on attachment: 420928

Committed r273327 (234480@main): <https://commits.webkit.org/234480@main>
Comment 27 Fujii Hironori 2021-02-23 11:55:52 PST
All reviewed patches have been landed.  Closing bug.