It's not clear to me why specializing nsCOMPtr<nsISupports> is
particularly useful, and this removes a lot of code, bringing us closer
to unifying nsCOMPtr and RefPtr.
The changes in other places are needed because we used to allow
nsCOMPtr<nsISupports> to implicitly coerce to nsISupports even for
rvalue references.
0:47.88 /home/emilio/src/moz/gecko-4/netwerk/protocol/http/nsHttpActivityDistributor.cpp:121:11: error: conversion function from 'nsCOMPtr<nsISupports>' to 'nsISupports *' invokes a deleted function
0:47.88 nsCOMPtr<nsISupports>(do_QueryObject(channel)), aActivityType,
0:47.88 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0:47.88 /home/emilio/src/moz/gecko-4/obj-debug/dist/include/nsCOMPtr.h:764:3: note: 'operator nsISupports *' has been explicitly marked deleted here
0:47.88 operator T*() const&& = delete;
0:47.88 ^
0:47.88 /home/emilio/src/moz/gecko-4/netwerk/protocol/http/nsHttpActivityDistributor.cpp:29:57: note: passing argument to parameter 'aHttpChannel' here
0:47.88 nsHttpActivityDistributor::ObserveActivity(nsISupports* aHttpChannel,
0:47.88 ^
Which is not allowed for a good reason, generally.
Differential Revision: https://phabricator.services.mozilla.com/D179124
We calculate the canvas random noises after allocating the ArrayData
that shouldn't be GC'ed. However, GC can happen when generating the
random noises. This could have potential issue that ArrayData get GC'ed
when it shouldn't be.
This patch fixes this by moving the calculation of random noises before
allocating the Array Data.
Differential Revision: https://phabricator.services.mozilla.com/D179538
We have a heuristic that falls back from stroking certain paths with acceleration because
both WGR and the texture cache can have slow output as the size of the path increases in
screen area. AA-Stroke tends to have better output for these paths, or at least, this heuristic
tends to have a detrimental effect on AA-Stroke usage and performance in important tests.
Lets move the heuristic to after we use AA-Stroke for now.
Differential Revision: https://phabricator.services.mozilla.com/D178549
We have a heuristic that falls back from stroking certain paths with acceleration because
both WGR and the texture cache can have slow output as the size of the path increases in
screen area. AA-Stroke tends to have better output for these paths, or at least, this heuristic
tends to have a detrimental effect on AA-Stroke usage and performance in important tests.
Lets move the heuristic to after we use AA-Stroke for now.
Differential Revision: https://phabricator.services.mozilla.com/D178549
We have a heuristic that falls back from stroking certain paths with acceleration because
both WGR and the texture cache can have slow output as the size of the path increases in
screen area. AA-Stroke tends to have better output for these paths, or at least, this heuristic
tends to have a detrimental effect on AA-Stroke usage and performance in important tests.
Lets move the heuristic to after we use AA-Stroke for now.
Differential Revision: https://phabricator.services.mozilla.com/D178549
When introducing the random noises to the image data in
CanvasRenderingContext2D::GetImageDataArray would also alter the actual
image buffer. This will change the random noises every time we call the
function because the random noises is generated according to the image
data. This is undesirable and the random noises should remain the
same in the browsing session with the same canvas.
To fix this issue, we clone the actual image data if canvas randomization is
enabled and introduce noises to the cloned data, which doesn't change
the actual image buffer. So, the random nosies will remain consistent in
a single browser session.
We also fix some minor issues in this patch.
Differential Revision: https://phabricator.services.mozilla.com/D178327
For OffscreenCanvas, currently only absolute CSS <length> values are accepted when
setting the letterSpacing and wordSpacing attributes, as we have no context to resolve
other units.
Other types of length are accepted for in-document <canvas> elements.
As a followup, we should try to add support for font-relative units (em, ch, etc),
resolved against the canvas context's font attribute. These are potentially useful
for authors, and at least em is required for some of the existing WPT tests.
Differential Revision: https://phabricator.services.mozilla.com/D177019
This patch introduces random noises to data extraction functions of
canvas element and offscreen canvas. The random noise is based on the
random key of the cookieJarSettings and the image data itself.
The random noises would interfere the ability of fingerprinters that
use canvas data to fingerprint users. The random noise will make unique
canvas finerprint to for every browsing session. Therefore, fingerprinter
cannot use canvas fingerprint to tracker individuals across browsing
sessions.
Differential Revision: https://phabricator.services.mozilla.com/D175499
This patch moves ShouldResistFingerprinting() and add a RFPTarget as
input argument. We will use this function to check if canvas
fingerprinting protection is enabled.
We also modify the caller to pass the right RFPTarget for Canvas image
data extraction prompt. Note that, we need to set the default argument
for the function to known because it's used for WebGL fingerprinting
protection too. However, We don't cut over this part in this patch and
will do it in a future bug.
Differential Revision: https://phabricator.services.mozilla.com/D175608
For cases where bitmaps are compressed down to alpha textures, the underlying
assumption is that these were supposed to be treated as luminance data as well
in the shader, or rather, the alpha represents both the opacity and intensity.
We weren't properly swizzling in the shader to accomplish this. This fixes that.
Differential Revision: https://phabricator.services.mozilla.com/D176986
It seems that using a texture as a backing surface for a framebuffer
while simultaneously trying to use TexSubImage to upload to it aggravates
OpenGL driver bugs regarding the underlying representation of that
texture.
Given that I couldn't find an expedient way to preserve that optimized
upload path, instead we have to fallback to just uploading the sampling
rect of the surface to a transient texture that is then drawn via shader
to framebuffer.
Differential Revision: https://phabricator.services.mozilla.com/D176240
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
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
In current m-c, async RemoteTexture wait at RenderThread stops window update when the wait is too long. If async RemoteTexture is handled by WebRenderAPI, window could be updated during long async RemoteTexture wait.
async RemoteTexture wait of root WebRenderBridgeParent are disabled to simplify WebRenderAPI's wait handling.
offscreen canvas case is handled by WebRenderImageHost by Bug 1827578.
Differential Revision: https://phabricator.services.mozilla.com/D175590
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 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
Like on older Mali devices, the combination of
GL_MAP_INVALIDATE_RANGE_BIT with GL_MAP_UNSYNCHRONIZED_BIT appears to
be slow on a wide range of Adreno devices, so drop the former.
Differential Revision: https://phabricator.services.mozilla.com/D175230
In bug 1826134 we added a fast-path to WebGLBuffer::BufferSubData used
by DrawTargetWebgl, which under the hood uses glMapBufferRange with
GL_MAP_UNSYNCHRONIZED_BIT. However, this causes performance issues on
ANGLE. This patch therefore avoids the fast-path on ANGLE, falling
back to a simple glBufferSubData instead.
Differential Revision: https://phabricator.services.mozilla.com/D175135
It can fail when canceling the worker (though I couldn't reproduce the
crash locally). Some things were already accounting for it.
Rename some things for consistency.
Differential Revision: https://phabricator.services.mozilla.com/D175126
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
When an element is out of the flat tree we should treat it the same as
when it is out of the document, it has no meaningful style.
Differential Revision: https://phabricator.services.mozilla.com/D175030
DrawTargetWebgl renders a path by uploading vertex data to the back of
a large VBO using glBufferSubData then issuing a draw call, orphaning
the buffer when it becomes full. This results in many glBufferSubData
calls being interleaved with draw calls. On Mali GPUs this causes
severe performance issues as the driver is unable to determine that
any pending draw calls do not reference the updated region of the
buffer, and therefore must create a copy of the buffer for each
update.
However, since *we* know that we never overwrite a region that is
referenced by a submitted draw call, we can force the driver to avoid
making these copies. We do so by adding a new function
UnsynchronizedBufferSubData(), which acts like BufferSubData so long
as this rule is followed. Internally, this uses glMapBufferRange with
GL_MAP_UNSYNCHRONIZED_BIT, allowing the driver to omit the extraneous
copies.
Differential Revision: https://phabricator.services.mozilla.com/D174685