Bug 229749 - [CoordinatedGraphics] Schedule rendering after setLayerTreeStateIsFrozen(false) in non-AC mode
Summary: [CoordinatedGraphics] Schedule rendering after setLayerTreeStateIsFrozen(fals...
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tomoki Imai
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-31 20:54 PDT by Tomoki Imai
Modified: 2021-09-01 01:46 PDT (History)
13 users (show)

See Also:


Attachments
patch (2.01 KB, patch)
2021-08-31 20:57 PDT, Tomoki Imai
cgarcia: review+
cgarcia: commit-queue-
Details | Formatted Diff | Diff
patch (2.04 KB, patch)
2021-09-01 00:45 PDT, Tomoki Imai
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoki Imai 2021-08-31 20:54:50 PDT
We should schedule another rendering when the setLayerTreeStateIsFrozen(false) is called in non-AC mode.

In some rare cases, the browser only shows the white page after the page transition, because the rendering is skipped while the layer tree is frozen and there was no guarantee that there is another rendering after setLayerTreeStateIsFrozen(false).
Comment 1 Tomoki Imai 2021-08-31 20:57:51 PDT
Created attachment 436991 [details]
patch

Patch to schedule rendering when setLayerTreeStateIsFrozen(false) is called.
Comment 2 Fujii Hironori 2021-08-31 21:44:41 PDT
Do you have a test case?
Comment 3 Carlos Garcia Campos 2021-08-31 23:44:49 PDT
Comment on attachment 436991 [details]
patch

Wait, do we know for sure we are not in AC mode at that point?
Comment 4 Carlos Garcia Campos 2021-08-31 23:46:20 PDT
Comment on attachment 436991 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=436991&action=review

> Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:246
> +    else
> +        scheduleDisplay();

I think we should only call this if m_layerTreeHost is nullptr
Comment 5 Tomoki Imai 2021-09-01 00:36:41 PDT
(In reply to Fujii Hironori from comment #2)
> Do you have a test case?

Unfortunately no. 
On PlayStation, the issue is reproducible with the specific webpage (and sorry, I cannot paste url here..) but WinCairo/GTK cannot reproduce the issue even with the same page.
I believe there is a chance where the GTK/WinCairo encounter the same issue, but it seems to depend on the timing.
Comment 6 Tomoki Imai 2021-09-01 00:45:20 PDT
Created attachment 437000 [details]
patch

(In reply to Carlos Garcia Campos from comment #4)
> Comment on attachment 436991 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=436991&action=review
> 
> > Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:246
> > +    else
> > +        scheduleDisplay();
> 
> I think we should only call this if m_layerTreeHost is nullptr

Thanks for pointing!
You're correct, I added "if (!m_layerTreeHost)" guard there.
Comment 7 EWS 2021-09-01 01:32:21 PDT
tomoki.imai@sony.com does not have reviewer permissions according to https://raw.githubusercontent.com/WebKit/WebKit/main/Tools/Scripts/webkitpy/common/config/contributors.json.

Rejecting attachment 437000 [details] from commit queue.
Comment 8 EWS 2021-09-01 01:44:22 PDT
Committed r281841 (241174@main): <https://commits.webkit.org/241174@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 437000 [details].
Comment 9 Radar WebKit Bug Importer 2021-09-01 01:45:20 PDT
<rdar://problem/82617490>
Comment 10 Tomoki Imai 2021-09-01 01:46:47 PDT
Thanks for your review and cq+!
(Sorry, I should not have r+)