Open Bug 1952787 Opened 1 year ago Updated 1 year ago

nsRefreshDriver continues to tick with VsyncRefreshDriverTimer when Firefox window is occluded

Categories

(Core :: Layout, defect)

Unspecified
Windows
defect

Tracking

()

Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 --- wontfix
firefox136 --- wontfix
firefox137 --- wontfix
firefox138 --- wontfix

People

(Reporter: sotaro, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

Created from Bug 1924932 comment 67.

With the following STR, there were cases that nsRefreshDriver continued to tick with VsyncRefreshDriverTimer and Vsync keeps running. It seemed like a problem.

Blocks: 1924932

With Attachment 9470695 [details] [diff], when the problem happened, PresShell::ComputeActiveness() returned true because "browserChild->IsPreservingLayers()" returned false. Then nsRefreshDriver was set active and it kept ticking.

nsRefreshDriver::SetActivity() was changed by Bug 1847929. It might cause the regression.

Keywords: regression
Regressed by: 1847929

:emilio, can you look into this bug?

Flags: needinfo?(emilio)

(In reply to Sotaro Ikeda [:sotaro] from comment #3)

nsRefreshDriver::SetActivity() was changed by Bug 1847929. It might cause the regression.

Ah, it seems wrong from Bug 1924932 Comment 46, its regression happened around 112-114.

No longer regressed by: 1847929
Attachment #9470695 - Attachment is obsolete: true
Attachment #9470702 - Attachment is patch: true

Do you still need me to look at this? If so please ni? me again.

When the widget becomes occluded you should end up here, which should end up here or here.

Maybe one of those codepaths doesn't deactivate the browser properly?

Flags: needinfo?(emilio) → needinfo?(sotaro.ikeda.g)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #7)

Do you still need me to look at this? If so please ni? me again.

When the widget becomes occluded you should end up here, which should end up here or here.

Maybe one of those codepaths doesn't deactivate the browser properly?

The above code patch was not used. The problem was caused by PreloadedBrowser.

PreloadedBrowser was created by NewTabPagePreloading.maybeCreatePreloadedBrowser(). And timer start was trigged by ActivityStreamMessageChannel.tabLoaded()

Flags: needinfo?(sotaro.ikeda.g)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #9)

So, bug 1548683?

Yes.

function calls are like the following.


browser.renderLayers = true;
->BrowserHost::SetRenderLayers()
->BrowserParent::SetRenderLayers()
->BrowserParent::SetRenderLayersInternal()
->BrowserParent::SendRenderLayers()
->// IPC
->BrowserChild::RecvRenderLayers()
->BrowserChild::UpdateVisibility()
->BrowserChild::MakeVisible()
->BrowserChild::PresShellActivenessMaybeChanged()
-----> PresShell::ComputeActiveness()
-----> PresShell::SetIsActive()
--------> nsRefreshDriver::SetActivity()
--------> nsRefreshDriver::EnsureTimerStarted()

Then PreloadedBrowser always requests vsync enabled. It is not good.

Depends on: 1548683
Attachment #9470702 - Attachment is obsolete: true

It might be better to add a workaround before fixing Bug 1548683.

This bug has been marked as a regression. Setting status flag for Nightly to affected.

(setting old version flags to wontfix, to make it clear that they were also affected, since this regressed before 115 per comment 5. Otherwise bugdash surfaces this as a potential new regression in current nightly, which it's not.)

No longer blocks: 1924932
See Also: → 1924932

The severity field is not set for this bug.
:TYLin, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(aethanyc)

This is an old regression, so S3 feels right for now.

Severity: -- → S3
Flags: needinfo?(aethanyc)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: