Closed
Bug 1331402
Opened 7 years ago
Closed 7 years ago
Animated plugins in background tabs do CALayer updates and cause wakeups
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(firefox53 fixed)
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
Details
(Keywords: power)
Attachments
(1 file)
Steps to reproduce: 1. Open http://zombo.com/ in a tab. 2. Switch to a different tab that does not have a plugin in it. Expected results: The plugin background tab should not cause any calls to PPluginInstance::SendShow. Actual results: The plugin keeps submitting frames at 60fps. Example profile: https://clptr.io/2iyM9Om
Assignee | ||
Comment 1•7 years ago
|
||
This is because we're not setting the clipRect to empty.
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8827521 [details] Bug 1331402 - Update plugins' clipRects when hiding a tab. https://reviewboard.mozilla.org/r/105182/#review106318
Attachment #8827521 -
Flags: review?(jmathies) → review+
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8827521 [details] Bug 1331402 - Update plugins' clipRects when hiding a tab. https://reviewboard.mozilla.org/r/105182/#review106482
Attachment #8827521 -
Flags: review?(matt.woodrow) → review+
Comment 5•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6587e676b76d
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Assignee | ||
Comment 7•7 years ago
|
||
I'd like to uplift it but I'm not 100% sure how / whether this bug and the patch affect non-Mac platforms, so I'm not comfortable requesting uplift quite yet. Can you check whether plugins on Windows are affected by it?
Flags: needinfo?(mstange) → needinfo?(jmathies)
Comment 8•7 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #7) > I'd like to uplift it but I'm not 100% sure how / whether this bug and the > patch affect non-Mac platforms, so I'm not comfortable requesting uplift > quite yet. Can you check whether plugins on Windows are affected by it? Hmm, so we update clipRect for both windowed and windowless on Windows in a slightly different place - xul.dll!nsPluginInstanceOwner::UpdateWindowPositionAndClipRect(bool aSetWindow) Line 3625 C++ xul.dll!nsPluginInstanceOwner::UpdateDocumentActiveState(bool aIsActive) Line 3689 C++ xul.dll!SetPluginIsActive(nsISupports * aSupports, void * aClosure) Line 10728 C++ xul.dll!nsIDocument::EnumerateActivityObservers(void(*)(nsISupports *, void *) aEnumerator, void * aData) Line 9779 C++ xul.dll!mozilla::PresShell::SetIsActive(bool aIsActive) Line 10750 C++ xul.dll!nsDocShell::SetIsActive(bool aIsActive) Line 6198 C++ xul.dll!mozilla::dom::TabChild::RecvSetDocShellIsActive(const bool & aIsActive, const bool & aPreserveLayers, const unsigned __int64 & aLayerObserverEpoch) Line 2424 C++ So on Windows I think your added code is redundant. However it doesn't result in any additional calls to SetWindow on the plugin since we have checks for this in nsPluginInstanceOwner::UpdateWindowPositionAndClipRect. I haven't check yet but I'[m pretty sure linux follows this code path as well. Maybe we should ifdef that code you added to osx?
Flags: needinfo?(jmathies) → needinfo?(mstange)
Comment 9•7 years ago
|
||
or maybe move it to the nsPluginFrame code specific to OSX, assuming there's something in there that gets triggered by the doc active state changes.
Assignee | ||
Comment 10•7 years ago
|
||
Or we could make nsPluginInstanceOwner::UpdateDocumentActiveState call into similar code on OSX (which sets the clip rect to empty) and remove the code I added in this bug. That would make things work more similarly on the different platforms.
Flags: needinfo?(mstange)
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•