Tryserver says this fails on Linux, though it passes for me locally;
it depends whether we end up using subpixel positioning or not, which
in turn is dependent on a whole slew of factors. So marking as random
there. Other platforms look happy.
Depends on D184820
Differential Revision: https://phabricator.services.mozilla.com/D185294
Bug 1704954 disabled DirectComposition for users with NVIDIA graphics
hardware and mixed monitor refresh rates on Windows 10 and 11, as a
mitigation for bug 1638709. However, that bug is almost -- perhaps
entirely -- unknown on Windows 11 (q.v. for details), and the fallback
path it uses has been shown to cause issues there (bug 1763981).
Restrict the mitigation to only occur on Windows 10, where bug 1638709
is exhibited, but where no issues with the fallback path are known.
This also effectively reverts bug 1816001, which it obviates.
Differential Revision: https://phabricator.services.mozilla.com/D178848
This mitigation exposed bug 1763981. Unfortunately, not applying it on
Nightly made it look like bug 1763981 was _fixed_ in Nightly, tricking
several users and developers and making testing needlessly more
difficult even after this was discovered.
Apply the mitigation across the board, regardless of release channel.
Developers may still set `gfx.webrender.dcomp-apply-1704954` to override
this as needed for testing (e.g.) fixes for bug 1638709.
Differential Revision: https://phabricator.services.mozilla.com/D176843
This adds the new infrastructure for rendering masked primitives
and uses it for simple rectangle primitives. Follow up patches
will port other primitives to it (and transformed rectangles).
Instead of rendering an alpha mask and then applying that during
picture cache rendering of content, the underlying content is
drawn to an off-screen surface, and the mask is applied on
top of that via multiplicative blending.
This is particularly helpful for applying masks to dynamically
rendered pictures in future, as we can apply the mask over the
already rendered picture without allocating an extra surface.
Since the content and mask is rendered together to a surface,
we can take advantage of this in future by caching the result
in the texture cache, rather than a temporary render target.
This means we don't need to redraw clip masks for this content
each time the surrounding area is invalidated.
Since the clip-mask is rendered in to the off-screen surface,
it is cheaper and simpler to composite the content in to the
main scene, avoiding an extra texture fetch and some tricky
fragment shader logic to sample the correct part of the mask.
To reduce the number of off-screen pixels that get drawn, the
system supports splitting the content up in to a series of
segments. This can either be a 9-patch, for the simple and
common case of a single rounded clip, or a tile grid across
the primitive. The tile grid can make it much faster to apply
large image masks, where there are often large areas that we
can determine are not affected by the mask image.
Differential Revision: https://phabricator.services.mozilla.com/D173095
This adds the new infrastructure for rendering masked primitives
and uses it for simple rectangle primitives. Follow up patches
will port other primitives to it (and transformed rectangles).
Instead of rendering an alpha mask and then applying that during
picture cache rendering of content, the underlying content is
drawn to an off-screen surface, and the mask is applied on
top of that via multiplicative blending.
This is particularly helpful for applying masks to dynamically
rendered pictures in future, as we can apply the mask over the
already rendered picture without allocating an extra surface.
Since the content and mask is rendered together to a surface,
we can take advantage of this in future by caching the result
in the texture cache, rather than a temporary render target.
This means we don't need to redraw clip masks for this content
each time the surrounding area is invalidated.
Since the clip-mask is rendered in to the off-screen surface,
it is cheaper and simpler to composite the content in to the
main scene, avoiding an extra texture fetch and some tricky
fragment shader logic to sample the correct part of the mask.
To reduce the number of off-screen pixels that get drawn, the
system supports splitting the content up in to a series of
segments. This can either be a 9-patch, for the simple and
common case of a single rounded clip, or a tile grid across
the primitive. The tile grid can make it much faster to apply
large image masks, where there are often large areas that we
can determine are not affected by the mask image.
Differential Revision: https://phabricator.services.mozilla.com/D173095
Mali profiling tools have shown we are frequently fragment bound, in
particular due to varying interpolation. To help mitigate this, we
should use mediump where possible. Currently most of our varyings are
implicitly highp by default. This patch reduces their precision to
mediump where possible. When varyings must remain highp for
correctness reasons, this is now stated explicitly.
As expected, this does cause a fair bit of reftest fuzziness on
Android devices. This patch also updates reftest expectations to
reflect this.
Differential Revision: https://phabricator.services.mozilla.com/D173028
These crashtests rely upon either a requestAnimationFrame callback or a
MozAfterPaint event. Those currently won't happen when the compositor is
paused, and on Windows these crashtests are occluded, which will now pause
the compositor. To deal with this, we disable the occlusion tracking pref
on Windows. Other platforms seem not to treat the crashtests as occluded,
so their compositors keep running.
Differential Revision: https://phabricator.services.mozilla.com/D171137
This patch adds two new prefs, gfx.webrender.scissored-cache-clears
.enabled and .force-enabled to control its status beyond the blocklist.
The former is true by default and allows one to turn the feature off by
flipping it to false. The latter allows one to force the feature on even
if the blocklist disables it. It also adds the status to the decision
log in about:support.
Differential Revision: https://phabricator.services.mozilla.com/D170507
Most usage is a straight replacement but gtk needs extra changes as it transfers plain text in UTF8 natively and needs to be converted into UTF16, and Windows uses single-byte characters for RTF and CF_HTML formats so we preserve this.
Differential Revision: https://phabricator.services.mozilla.com/D158587
This is:
* An easier way for browser code to access it.
* Avoids having a bunch of per-platform implementations.
* We don't need to actually get graphics info for it to work.
So it should be a bit nicer over all.
Differential Revision: https://phabricator.services.mozilla.com/D168373
There is some edge AA fuzziness due to the differences between
the test and reference. Fuzzing them doesn't affect the test
result as when the bug occurs the rendering difference is
dramatically different.
Differential Revision: https://phabricator.services.mozilla.com/D168464
There is some edge AA fuzziness due to the differences between
the test and reference. Fuzzing them doesn't affect the test
result as when the bug occurs the rendering difference is
dramatically different.
Differential Revision: https://phabricator.services.mozilla.com/D168306
Revert the original changes from bug 1772049 for now. We don't
currently rely on that patch, having found a simpler way to
handle how that code interacts with the backdrop-filter code.
Differential Revision: https://phabricator.services.mozilla.com/D168015
Move it to the mozilla::widget namespace.
Use enum classes for transparency, popup type, popup level, etc.
Mostly automated with sed, but there were a few manual changes required
as well in windows code because they relied on Atomic<TransparencyMode>
working (which now doesn't because TransparencyMode is 1 byte instead of
4 bytes).
Differential Revision: https://phabricator.services.mozilla.com/D167537