WebRenderScrollData encodes a tree structure of layers stored in
a flat array. Objects originating from a less trusted source
(e.g. sent over IPC from a content process) need to be validated
to ensure they encode a proper tree structure.
Depends on D175216
Differential Revision: https://phabricator.services.mozilla.com/D175217
bug 1827578 did not change how WebRenderImageHost worked. Assert was just added for checking. Then it should be OK to remove the assert.
Differential Revision: https://phabricator.services.mozilla.com/D175580
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
Upstream Skia removed support for applying a cover mask to a layer. The closest
we can do is apply a clip shader to the layer push/pop, which allows us to supply
the mask. This reduces our depence on experimental Skia features, and performance
seems acceptable.
Differential Revision: https://phabricator.services.mozilla.com/D173325
This just tries to address fairly random changes in the Skia API and correct
our usage of it in Moz2D and some other places.
Differential Revision: https://phabricator.services.mozilla.com/D173324
This transitions generate_mozbuild to python3, since the existing script was
bitrotted with python2.
The generated moz.build is also fixed up for the new Skia files.
Differential Revision: https://phabricator.services.mozilla.com/D173323
Upstream Skia removed support for applying a cover mask to a layer. The closest
we can do is apply a clip shader to the layer push/pop, which allows us to supply
the mask. This reduces our depence on experimental Skia features, and performance
seems acceptable.
Differential Revision: https://phabricator.services.mozilla.com/D173325
This just tries to address fairly random changes in the Skia API and correct
our usage of it in Moz2D and some other places.
Differential Revision: https://phabricator.services.mozilla.com/D173324
This transitions generate_mozbuild to python3, since the existing script was
bitrotted with python2.
The generated moz.build is also fixed up for the new Skia files.
Differential Revision: https://phabricator.services.mozilla.com/D173323
It should be OK to wait remote texture ready of offscreen canvas at WebRenderImageHost. Offscreen canvas uses ImageBridge. And ImageBridge works asynchronously.
WebRenderImageHost::UseRemoteTexture() is split to WebRenderImageHost::PushPendingRemoteTexture() and WebRenderImageHost::UseRemoteTexture(). It is for handling RemoteTexture ready callback in WebRenderImageHost.
Differential Revision: https://phabricator.services.mozilla.com/D175226
Webrender doesn't seem to handle them well. This of course will affect the balance of making things active, but hopefully this is a good trade off.
Differential Revision: https://phabricator.services.mozilla.com/D165726
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
Upstream Skia removed support for applying a cover mask to a layer. The closest
we can do is apply a clip shader to the layer push/pop, which allows us to supply
the mask. This reduces our depence on experimental Skia features, and performance
seems acceptable.
Differential Revision: https://phabricator.services.mozilla.com/D173325
This just tries to address fairly random changes in the Skia API and correct
our usage of it in Moz2D and some other places.
Differential Revision: https://phabricator.services.mozilla.com/D173324
This transitions generate_mozbuild to python3, since the existing script was
bitrotted with python2.
The generated moz.build is also fixed up for the new Skia files.
Differential Revision: https://phabricator.services.mozilla.com/D173323