Some BasicCompositor cleanup
Categories
(Core :: Graphics: Layers, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
Details
Attachments
(12 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Assignee | ||
Comment 1•6 years ago
|
||
This should be equivalent to what we had before but clearer.
Before this patch, we would reallocate the back buffer if
- the back buffer was larger than the client size (meaning the window had shrunk) or
- the invalid region didn't fit in the back buffer.
Whenever the window is resized, we have a frame where the invalid region covers
the entire window, and thus size would be equal clientSize in that frame.
So effectively, the back buffer size was always kept in sync with the client size.
Assignee | ||
Comment 2•6 years ago
|
||
Depends on D41671
Assignee | ||
Comment 3•6 years ago
|
||
On Windows, where the DrawTarget is rewrapped in a Cairo/pixman DrawTarget,
this will now cause Cairo/pixman to be used for the clear.
Depends on D41672
Assignee | ||
Comment 4•6 years ago
|
||
Depends on D41673
Assignee | ||
Comment 5•6 years ago
|
||
In the past, BeginFrame would clip mDrawTarget to the invalid region and then have
CreateRenderTargetForWindow clear a rectangle. So it was effectively clearing a
region, but only if BeginFrame's region clip happened to be set on the correct
DrawTarget. In the case where a back buffer was used, this was not the case:
The clip would be on mDrawTarget but the clear would happen on the back buffer
draw target. So we were clearing more than necessary.
Now we limit clearing to the invalid region even if a back buffer is used.
Depends on D41674
Assignee | ||
Comment 6•6 years ago
|
||
There was an interesting "ExpandToEnclose(IntPoint(0, 0))" call in
CreateRenderTargetForWindow that snuck in some surprising behavior that this
change makes a bit more visible.
Depends on D41675
Assignee | ||
Comment 7•6 years ago
|
||
The null is unnecessary because mDrawTarget is already null-checked above:
If mTarget is non-null, then mDrawTarget = mTarget so mDrawTarget is non-null.
If mTarget is null, then we would enter a branch that had another null check
for mDrawTarget.
As for the assertion: When rendering to an external target (reftests),
LayerManagerComposite always sets the invalid region to the entire window, so it
should never be empty here.
Depends on D41676
Assignee | ||
Comment 8•6 years ago
|
||
Depends on D41677
Assignee | ||
Comment 9•6 years ago
|
||
There's no point in mutating it, and nobody does.
Depends on D41678
Assignee | ||
Comment 10•6 years ago
|
||
ScreenPixels would be a more appropriate unit. But inside BasicCompositor everything
is in the same coordinate space anyway so we're not getting much benefit from the
units. This patch eliminates a lot of .ToUnknown*() calls.
Depends on D41679
Assignee | ||
Comment 11•6 years ago
|
||
Depends on D41680
Assignee | ||
Comment 12•6 years ago
|
||
Depends on D41681
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/16f39b7ca09c
https://hg.mozilla.org/mozilla-central/rev/9c974e6fce9b
https://hg.mozilla.org/mozilla-central/rev/1e4d840a8982
https://hg.mozilla.org/mozilla-central/rev/3c32857ee6ec
https://hg.mozilla.org/mozilla-central/rev/7bbd8ac1b408
https://hg.mozilla.org/mozilla-central/rev/fe629a74a577
https://hg.mozilla.org/mozilla-central/rev/8c08fc16b204
https://hg.mozilla.org/mozilla-central/rev/9d0fed01b154
https://hg.mozilla.org/mozilla-central/rev/c69027259ea0
https://hg.mozilla.org/mozilla-central/rev/3ab4673f6804
https://hg.mozilla.org/mozilla-central/rev/b585cff4e2c8
https://hg.mozilla.org/mozilla-central/rev/14bd73fd1e01
Description
•