Preparations for native layers that only cover part of the window
Categories
(Core :: Graphics: Layers, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
Details
Attachments
(15 files, 3 obsolete files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
aClipRect is relative to
closestAncestorContainerLayerWithIntermediateSurface->GetVisibleRegion().GetBounds().TopLeft()
or (0, 0) if there is no ancestor with an intermediate surface.
It gets computed by Layer::CalculateScissorRect.
So if there is an intermediate surface, that origin matches the render target
origin. But if there is no intermediate surface, it does not always match: the
root render target's origin is not necessarily (0, 0).
In the past, this was dealt with using the transform on the root render target's
mDrawTarget, which gets set in CreateRenderTargetForWindow (renamed to
CreateRootRenderTarget in this patch). Render targets created in the regular
CreateRenderTarget did not have a transform.
Now all render targets have a translation by -offset on their DrawTarget, not just
the root render target.
I went with an explicit "clip space origin" field on the render target.
Other alternatives would have been:
- Having a bool IsRootRenderTarget() and using that to conditionally offset
aClipRect by the render target origin or not. - Changing Layer::CalculateScissorRect so that the clip space origin is always
(0, 0). I actually tried this first but ran into trouble with the MLGPU code.
We can do it later.
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D43866
Assignee | ||
Comment 7•5 years ago
|
||
This uses the same workaround as BasicCompositor.
Depends on D43867
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D42424
Assignee | ||
Comment 9•5 years ago
|
||
TransformAndClipBounds already clips destRect to renderBounds. However, if the
resulting rect is empty, the Inflate call would make it non-empty again. And now
the decision whether we would cull would depend on the rect's position:
Sometimes TransformAndClipBounds would place the empty rect at a position along
an edge of renderBounds, and then the inflated-from-nothingness 2x2 rect would
overlap and we wouldn't cull.
Depends on D43869
Assignee | ||
Comment 10•5 years ago
|
||
In the end we want to have BeginFrameForWindow, BeginFrameForTarget, and
BeginFrameForNativeLayers, the latter with multiple Begin/EndRenderingToNativeLayer
pairs nested inside.
This is the first step.
CompositorOGL and CompositorD3D11 keep their internal BeginFrame method but make
it private.
Depends on D43870
Assignee | ||
Comment 11•5 years ago
|
||
Depends on D43871
Assignee | ||
Comment 12•5 years ago
|
||
This will let us render into multiple layers within one compositor frame.
Depends on D43872
Assignee | ||
Comment 13•5 years ago
|
||
Depends on D43873
Assignee | ||
Comment 14•5 years ago
|
||
Depends on D43874
Assignee | ||
Comment 15•5 years ago
|
||
Depends on D43875
Assignee | ||
Comment 16•5 years ago
|
||
This makes profiler screenshots and frame recording work again, when native
layers are used.
Depends on D43876
Assignee | ||
Comment 17•5 years ago
|
||
This change groups the work that has to be done per compositing tile.
Depends on D43877
Assignee | ||
Comment 18•5 years ago
|
||
Depends on D43878
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 19•5 years ago
|
||
Comment 20•5 years ago
|
||
Comment 21•5 years ago
|
||
I made a quick fix for the bustages seen here:
https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Crunnable&fromchange=56928dc94586cba272761f8af49e67795baab0bf&tochange=25005fcdb10689745308d4eab5d67f4dd2b034ab&selectedJob=264370513
Try push for it:
https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=651bae54491958afb27026f8296839f2c3be406f
Comment 22•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/610cc17c5832
https://hg.mozilla.org/mozilla-central/rev/8a64ef16fc2e
https://hg.mozilla.org/mozilla-central/rev/de0fadd41dc3
https://hg.mozilla.org/mozilla-central/rev/dd092bce314d
https://hg.mozilla.org/mozilla-central/rev/f988e453af00
https://hg.mozilla.org/mozilla-central/rev/cc84a0e9d5dd
https://hg.mozilla.org/mozilla-central/rev/6035e8ef4f82
https://hg.mozilla.org/mozilla-central/rev/1591247f9ce8
https://hg.mozilla.org/mozilla-central/rev/4fcd04e8261e
https://hg.mozilla.org/mozilla-central/rev/ee0a3838c5c1
https://hg.mozilla.org/mozilla-central/rev/6d1b97aed6f0
https://hg.mozilla.org/mozilla-central/rev/29be5f4832ca
https://hg.mozilla.org/mozilla-central/rev/ea690c643c8c
https://hg.mozilla.org/mozilla-central/rev/1db2a705c75c
https://hg.mozilla.org/mozilla-central/rev/56928dc94586
https://hg.mozilla.org/mozilla-central/rev/25005fcdb106
Assignee | ||
Comment 23•5 years ago
|
||
(In reply to Alexandru Michis [:malexandru] from comment #21)
I made a quick fix for the bustages
Thank you!! I'm not sure how this happened. I suppose I must have always compiled when I had the patch from bug 1574586 applied as well, which removes the offending line.
Comment 24•5 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/610cc17c5832
https://hg.mozilla.org/releases/mozilla-beta/rev/8a64ef16fc2e
https://hg.mozilla.org/releases/mozilla-beta/rev/de0fadd41dc3
https://hg.mozilla.org/releases/mozilla-beta/rev/dd092bce314d
https://hg.mozilla.org/releases/mozilla-beta/rev/f988e453af00
https://hg.mozilla.org/releases/mozilla-beta/rev/cc84a0e9d5dd
https://hg.mozilla.org/releases/mozilla-beta/rev/6035e8ef4f82
https://hg.mozilla.org/releases/mozilla-beta/rev/1591247f9ce8
https://hg.mozilla.org/releases/mozilla-beta/rev/4fcd04e8261e
https://hg.mozilla.org/releases/mozilla-beta/rev/ee0a3838c5c1
https://hg.mozilla.org/releases/mozilla-beta/rev/6d1b97aed6f0
https://hg.mozilla.org/releases/mozilla-beta/rev/29be5f4832ca
https://hg.mozilla.org/releases/mozilla-beta/rev/ea690c643c8c
https://hg.mozilla.org/releases/mozilla-beta/rev/1db2a705c75c
https://hg.mozilla.org/releases/mozilla-beta/rev/56928dc94586
https://hg.mozilla.org/releases/mozilla-beta/rev/25005fcdb106
Description
•