Closed
Bug 1021845
Opened 11 years ago
Closed 9 years ago
Optimize intermediate surface sizes when compositing and take clips into account
Categories
(Core :: Graphics: Layers, defect, P1)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla45
People
(Reporter: mstange, Assigned: mstange)
References
Details
Attachments
(3 files)
When a container layer requires an intermediate surface, the surface is sized to its visible region. However, in some cases container layers lie about their visible region; the cases that immediately come to my mind are:
- display ports and
- prerendered transforms.
In these cases we ask the GPU to do a lot of work for stuff that won't be visible in the end.
Assignee | ||
Comment 1•10 years ago
|
||
One way to fix this would be to have a "compute visibility" pass on the Compositor side prior to every composite that sets the shadow visible region to what will actually be visible of this layer in the current frame, taking async transforms into account. Then we can keep the logic that sizes the intermediate surface to the visible region bounds. We just need to make sure that it uses the shadow visible region if available.
Assignee | ||
Comment 2•10 years ago
|
||
The combination of display ports and intermediate container layer surfaces can cause the fill ratio number to go up considerably.
Assignee | ||
Comment 3•9 years ago
|
||
Bug 1021845 - Before compositing, clip the visible region of a layer to the layer's clip rect. r?mattwoodrow
Attachment #8664842 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 4•9 years ago
|
||
This patch is very similar to the second part in bug 1136766 (which you already reviewed), but it's not based on the first patch from that bug (because that caused performance regressions) and it's not limited to integer translations.
Comment 5•9 years ago
|
||
Comment on attachment 8664842 [details]
MozReview Request: Bug 1021845 - Before compositing, clip the visible region of a layer to the layer's clip rect. r=mattwoodrow
https://reviewboard.mozilla.org/r/20039/#review18061
Attachment #8664842 -
Flags: review?(matt.woodrow) → review+
Backed out for b2g r3 and r7 permafails: https://treeherder.mozilla.org/logviewer.html#?job_id=14641754&repo=mozilla-inbound
https://hg.mozilla.org/integration/mozilla-inbound/rev/e22824771c7f
Flags: needinfo?(mstange)
Comment 8•9 years ago
|
||
as a note, this caused a very large win for tcheck2 on android:
http://graphs.mozilla.org/graph.html#tests=[[201,64,29],[201,63,29]]&sel=none&displayrange=7&datatype=geo
Assignee | ||
Comment 9•9 years ago
|
||
Comment 10•9 years ago
|
||
Note that I added code to retain intermediate surfaces. I skimmed the patch but it wasn't clear if it interfered with that or not.
Assignee | ||
Comment 11•9 years ago
|
||
Assignee | ||
Comment 12•9 years ago
|
||
Assignee | ||
Comment 13•9 years ago
|
||
(In reply to Benoit Girard (:BenWa) from comment #10)
> Note that I added code to retain intermediate surfaces. I skimmed the patch
> but it wasn't clear if it interfered with that or not.
I don't think it will. Whenever the surface rect moves or changes size, we reallocate the surface.
No longer blocks: 1225868
Flags: needinfo?(mstange)
Blocks: 1184343
Assignee | ||
Comment 15•9 years ago
|
||
Assignee | ||
Comment 16•9 years ago
|
||
Assignee | ||
Comment 17•9 years ago
|
||
Comment on attachment 8664842 [details]
MozReview Request: Bug 1021845 - Before compositing, clip the visible region of a layer to the layer's clip rect. r=mattwoodrow
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/20039/diff/1-2/
Attachment #8664842 -
Attachment description: MozReview Request: Bug 1021845 - Before compositing, clip the visible region of a layer to the layer's clip rect. r?mattwoodrow → MozReview Request: Bug 1021845 - Before compositing, clip the visible region of a layer to the layer's clip rect. r=mattwoodrow
Assignee | ||
Comment 18•9 years ago
|
||
Bug 1021845 - Don't skip checkerboarding layers during compositing, even if the layer's visible region is empty. r?botond
Attachment #8693528 -
Flags: review?(botond)
Updated•9 years ago
|
Priority: -- → P1
Comment 19•9 years ago
|
||
https://reviewboard.mozilla.org/r/20039/#review24043
::: gfx/layers/composite/LayerManagerComposite.cpp:209
(Diff revision 2)
> +IntersectMaybeRects(const Maybe<RectType>& aRect1, const Maybe<RectType>& aRect2)
In bug 1168263, I added an IntersectMaybeRects() function to AsyncCompositionManager.cpp. We may want to consider moving it to a shared header and reusing it.
Comment 20•9 years ago
|
||
Comment on attachment 8693528 [details]
MozReview Request: Bug 1021845 - Don't skip checkerboarding layers during compositing, even if the layer's visible region is empty. r?botond
https://reviewboard.mozilla.org/r/26207/#review24045
Attachment #8693528 -
Flags: review?(botond) → review+
Assignee | ||
Comment 21•9 years ago
|
||
Assignee | ||
Comment 22•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/10fb062fb1ae906a0ad43555ee0f62dfe7ec667f
Bug 1021845 - Before compositing, clip the visible region of a layer to the layer's clip rect. r=mattwoodrow
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc0ac31d14eb4b218df818e164bf9de897cf561a
Bug 1021845 - Don't skip checkerboarding layers during compositing, even if the layer's visible region is empty. r=botond
Comment 23•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/10fb062fb1ae
https://hg.mozilla.org/mozilla-central/rev/fc0ac31d14eb
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Assignee | ||
Comment 24•9 years ago
|
||
Comment 25•9 years ago
|
||
This was backed out from Firefox 45.
https://hg.mozilla.org/releases/mozilla-aurora/rev/64ec448f156d
You need to log in
before you can comment on or make changes to this bug.
Description
•