Previously, function subtyping was only checking the invariance.
Now, return types are covariant and arguments are contravariant.
Differential Revision: https://phabricator.services.mozilla.com/D175697
In this case we shouldn't copy all dense elements from the source object.
This can happen when `@@isConcatSpreadable` is used with non-array objects.
The patch also adds a number of tests for that to improve our test coverage.
Differential Revision: https://phabricator.services.mozilla.com/D176312
We have seen reports that various websites, including twitter, perform
poorly on older Adreno devices due, to backdrop filter. We previously
encountered similar on Mali-G710 devices in bug 1809738, and it
appeared to be due to having to copy the contents of large
framebuffers--required to render the backdrop filter--to and from the
GPU's tile memory. On Mali we were able to avoid this penalty by
ensuring we performed an unscissored clear immediately after binding
the framebuffer, allowing the driver to omit initalizing the contents
of tile memory prior to rendering.
It's plausible that older Adreno drivers are not clever enough to be
able to make this optimization. However, there exists an extension
QCOM_tiled_rendering, which allows us to explicitly tell the driver
which subregion of a render target we are rendering too, and whether
it must be pre-initilized or post-resolved.
This patch makes use of this extension when rendering to color and
picture cache targets. In both cases we supply the region that is
being rendered and must only resolve the color attachment back to main
memory. In most cases we can additionally avoid initializing tile
memory prior to rendering, with the exception being in
draw_color_target() when we do not perform an initial clear, in which
case we must initialize the color attachment.
This results in a significant performance improvement on twitter when
tested on a Nexus 5 (Adreno 330) device.
Differential Revision: https://phabricator.services.mozilla.com/D176154
When we're called from IPC, we can race the child for frame loader
destruction, which means we can wind up with a null `mFrameLoader` here.
Adding a null check is consistent with the other similar null checks higher
and lower in the call chain.
Differential Revision: https://phabricator.services.mozilla.com/D176286
We were decoding groups and files source items label,
but not folders.
We fix this and take the occasion to use decodeURI instead
of the non-standard unescape.
A test is added to ensure the source tree items are rendered
as expected.
Differential Revision: https://phabricator.services.mozilla.com/D176145
If an issue occurs when generating the PDF stream, we should be able to
send an error. The prior function (SendError()) was for stream readers
to use. The error state here can occur during writing.
Created a WriteError() option to set an error state that will cause
an IOException when reading to indicate the stream is in an inconclusive
state and to stop reading from it.
Differential Revision: https://phabricator.services.mozilla.com/D175918
This patch introduces multiple thresholds, depending on platform and color, as
the colors rendered to screen are captured in the display rgb color profile on
Mac and therefore can be significantly off. See bug 1827606 for always capturing
in sRGB.
Differential Revision: https://phabricator.services.mozilla.com/D174754
White is less susceptible to false positives than grey with a high threshold,
given that all its components are at an extreme (255 vs 128).
Differential Revision: https://phabricator.services.mozilla.com/D174753
Improve naming of some of the variables, remove some redundant type
params, and avoid calling TimeStamp::Now() unnecessarily, which is not
free.
Depends on D176282
Differential Revision: https://phabricator.services.mozilla.com/D176283
Once we detect we're idle, remove the idle timer (until the frame callback
fires again, which would start the timer).
That makes vsync not fire at 1Hz on occluded windows (it makes vsync not fire
at all for those). Matching the windows behavior too.
We had this so that we didn't leak in bug 1786247, but the right fix is
bug 1828587.
Differential Revision: https://phabricator.services.mozilla.com/D176282