Граф коммитов

4077 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez c2f5a4ac7a Bug 1835119 - Remove nsCOMPtr_base. r=xpcom-reviewers,kmag
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
2023-05-31 21:58:43 +00:00
Tim Huang 723aed3bb9 Bug 1835989 - Calculate the canvas random noises before we allocate the ArrayData in CanvasRenderingContext2D. r=lsalzman
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
2023-05-31 16:39:33 +00:00
sotaro 0f007ec19c Bug 1834342 - Flush pending commands in DrawTargetWebgl::~DrawTargetWebgl() r=gfx-reviewers,lsalzman
By flushing pending commands, release memory that is allocated for DrawTargetWebgl.

Differential Revision: https://phabricator.services.mozilla.com/D179335
2023-05-30 03:09:12 +00:00
Jeff Muizelaar 5a6b419ed6 Bug 1833030. Don't use native_srgb on Windows. r=jgilbert
There was confusion about the purpose of this pref. Just hard code
it for now.

Differential Revision: https://phabricator.services.mozilla.com/D178355
2023-05-26 01:35:33 +00:00
Tom Ritter b8832ece7c Bug 1832681: Add the other Canvas RFPTargets r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D177830
2023-05-22 16:29:01 +00:00
Mark Banner 130a655906 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Lee Salzman 82c989cfaf Bug 1834079 - Move stroke fallback heuristic to after we attempt AA-Stroke. r=jrmuizel
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
2023-05-20 02:30:12 +00:00
Narcis Beleuzu dc797352d3 Backed out changeset a3eb3df78c8b (bug 1834079) for xpc crashes 2023-05-20 03:43:50 +03:00
Lee Salzman c9e9ce6031 Bug 1834079 - Move stroke fallback heuristic to after we attempt AA-Stroke. r=jrmuizel
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
2023-05-19 21:08:45 +00:00
Narcis Beleuzu b1ced66802 Backed out changeset cdb59ad562ed (bug 1834079) for wr failure on devicepixel.html CLOSED TREE 2023-05-19 20:53:29 +03:00
Lee Salzman 539bcd533c Bug 1834079 - Move stroke fallback heuristic to after we attempt AA-Stroke. r=jrmuizel
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
2023-05-19 16:17:53 +00:00
Tim Huang 05d8e8c08e Bug 1833213 - Clone the image data if canvas randomization is enabled in CanvasRenderingContext2D::GetImageDataArray(). r=tjr,lsalzman
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
2023-05-17 21:43:48 +00:00
Emilio Cobos Álvarez a7526d2a34 Bug 1832173 - Finish removing HasArcFFI. r=boris
Use the actual Locked<T> types around (via a typedef, just for
convenience).

Differential Revision: https://phabricator.services.mozilla.com/D177824
2023-05-12 22:31:38 +00:00
Butkovits Atila cc740ca292 Backed out changeset f6e3d050b3e7 (bug 1832173) for causing bustages at CanvasRenderingContext2D.cpp. CLOSED TREE 2023-05-13 01:16:03 +03:00
Emilio Cobos Álvarez 7fc0f42cee Bug 1832173 - Finish removing HasArcFFI. r=boris
Use the actual Locked<T> types around (via a typedef, just for
convenience).

Differential Revision: https://phabricator.services.mozilla.com/D177824
2023-05-12 21:37:19 +00:00
Jonathan Kew 10c3cdf1fc Bug 1778909 - Implement letterSpacing and wordSpacing attributes for Canvas2D text. r=saschanaz,emilio
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
2023-05-12 20:54:21 +00:00
Tim Huang 07cbc511d5 Bug 1816189 - Part 4: Add random noise when extracting data from canvas element when canvas randomization is enabled. r=tjr,lsalzman
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
2023-05-08 14:04:35 +00:00
Tim Huang d72f344231 Bug 1816189 - Part 3: Moving ShouldResistFingerprinting() to nsICanvasRenderingContextInternal from ClientWebCLContext and add a RFPTarget as an input argument. r=tjr,lsalzman
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
2023-05-08 14:04:34 +00:00
Lee Salzman b67a05fdd8 Bug 1831414 - Ensure patterns get transformed when using WGR. r=aosmond,gfx-reviewers,ahale
Differential Revision: https://phabricator.services.mozilla.com/D177342
2023-05-06 21:02:57 +00:00
Lee Salzman d4db5d13f2 Bug 1831391 - Only treat WebGL context as clear on new frame if its still valid. r=aosmond,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D177310
2023-05-05 20:01:47 +00:00
Lee Salzman 605964d9d2 Bug 1825293 - Treat alpha textures as luminance for bitmap data. r=aosmond
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
2023-05-03 14:05:26 +00:00
Kelsey Gilbert 1741f9c46a Bug 1829756 - E.g. DeleteTexture in ~WebGLTextureJS. r=gfx-reviewers,lsalzman
Otherwise GCing will not release them.

Differential Revision: https://phabricator.services.mozilla.com/D176828
2023-05-01 20:20:23 +00:00
Lee Salzman 5b43b941c7 Bug 1829468 - Avoid uploading directly to framebuffer texture. r=aosmond
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
2023-04-25 13:58:47 +00:00
Andreas Pehrson 16f574bd1f Bug 1826526 - In test_gUM_basicScreenshare.html draw white instead of grey. r=webrtc-reviewers,ng
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
2023-04-24 12:46:32 +00:00
Natalia Csoregi d62e9829b9 Backed out 2 changesets (bug 1826526) for causing failures on test_getUserMedia_basicScreenshare.html. CLOSED TREE
Backed out changeset a6ab77040b7c (bug 1826526)
Backed out changeset 2b8a934ef44c (bug 1826526)
2023-04-21 14:46:18 +03:00
Andreas Pehrson 7ed4104a88 Bug 1826526 - In test_gUM_basicScreenshare.html draw white instead of grey. r=webrtc-reviewers,ng
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
2023-04-21 06:58:39 +00:00
Lee Salzman eadab49de4 Bug 1828904 - Only accelerate with clear if rect is sufficiently large. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D176073
2023-04-20 19:19:15 +00:00
Lee Salzman 12aaadd1d1 Bug 1829058 - Cache scissor state in DrawTargetWebgl. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D175986
2023-04-20 14:27:52 +00:00
sotaro 62a86ac73d Bug 1828088 - Handle wait of async RemoteTexture at WebRenderAPI r=gfx-reviewers,lsalzman
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
2023-04-18 20:38:20 +00:00
Lee Salzman 5f37f41db4 Bug 1828137 - Support accelerating large clearRects if they encompass entire viewport. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D175727
2023-04-18 15:08:27 +00:00
Andi-Bogdan Postelnicu bf2bb59367 Bug 1277372 - Move away from "mozilla/TypeTraits.h". r=geckoview-reviewers,sergesanspaille,m_kato
std::is_pod has been deprecated in C++20, see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0767r1.html.
This is equivalent with std::is_trivial_v && std::is_standard_layout.

Differential Revision: https://phabricator.services.mozilla.com/D174128
2023-04-17 13:50:11 +00:00
Lee Salzman 17121ddfaa Bug 1821512 - Update fuzz for Skia update. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D173326
2023-04-16 15:34:50 +00:00
Lee Salzman dc0ab2eed4 Bug 1821512 - Fix Skia usage for API changes. r=jrmuizel
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
2023-04-16 15:34:50 +00:00
Natalia Csoregi 53631b0cfb Backed out 6 changesets (bug 1821512) for failures on browser_screenshots_test_full_page.js. CLOSED TREE
Backed out changeset a31f2795710e (bug 1821512)
Backed out changeset 3985c29a6490 (bug 1821512)
Backed out changeset 0d9814a43a4d (bug 1821512)
Backed out changeset e5570884e8e4 (bug 1821512)
Backed out changeset efc92c86fafd (bug 1821512)
Backed out changeset 3222f6498a44 (bug 1821512)
2023-04-16 11:30:32 +03:00
Lee Salzman f678652f3c Bug 1821512 - Update fuzz for Skia update. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D173326
2023-04-16 04:00:01 +00:00
Lee Salzman 14b145251e Bug 1821512 - Fix Skia usage for API changes. r=jrmuizel
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
2023-04-16 04:00:00 +00:00
Kelsey Gilbert f11a202eea Bug 1826678 - Add webgpu CanvasContext.canvas backlink. r=gfx-reviewers,webidl,jimb,smaug,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D174831
2023-04-13 19:15:00 +00:00
Dan Robertson 903da59f75 Bug 1822116 - image-orientation: none should apply to CORS image requests. r=emilio
The image-orientation: none property should apply to images that use
CORS.

Differential Revision: https://phabricator.services.mozilla.com/D175051
2023-04-13 01:41:53 +00:00
Jamie Nicol 06ac399c37 Bug 1827591 - Avoid setting GL_MAP_INVALIDATE_RANGE_BIT on Adreno devices. r=gfx-reviewers,lsalzman
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
2023-04-12 11:49:58 +00:00
Jamie Nicol 7cace3aaaf Bug 1827047 - Avoid unsynchronized BufferSubData fast-path on ANGLE. r=gfx-reviewers,lsalzman
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
2023-04-11 16:06:13 +00:00
Emilio Cobos Álvarez d27874678a Bug 1811950 - Allow WorkerGlobalScope.fonts to fail. r=aosmond,webidl,saschanaz
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
2023-04-11 13:44:53 +00:00
Iulian Moraru 6e2eff1bc5 Backed out 6 changesets (bug 1821512) for causing multiple failures. CLOSED TREE
Backed out changeset 97295a57babe (bug 1821512)
Backed out changeset 698104c7a5d1 (bug 1821512)
Backed out changeset 09aa18e47bf6 (bug 1821512)
Backed out changeset 20b46afb225f (bug 1821512)
Backed out changeset b531f604ea4c (bug 1821512)
Backed out changeset 0a7c0b0773d4 (bug 1821512)
2023-04-11 10:10:41 +03:00
Lee Salzman aea7f2d006 Bug 1821512 - Update fuzz for Skia update. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D173326
2023-04-11 05:00:06 +00:00
Lee Salzman 5a40892628 Bug 1821512 - Fix Skia usage for API changes. r=jrmuizel
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
2023-04-11 05:00:05 +00:00
Emilio Cobos Álvarez 0354d36d5d Bug 1792860 - Keep checking for shell destruction.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2023-04-10 22:49:02 +02:00
Emilio Cobos Álvarez c5a6a98177 Bug 1792860 - Deal better with canvases without styles. r=lsalzman,gfx-reviewers
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
2023-04-10 19:45:20 +00:00
Jamie Nicol 942a3f5367 Bug 1826134 - Avoid interleaving glBufferSubData calls with draw calls in DrawTargetWebgl. r=gfx-reviewers,jgilbert,lsalzman
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
2023-04-07 07:25:50 +00:00
Lee Salzman 805dbc2586 Bug 1826420 - Fast-path non-aligned clip rects in DrawTargetWebgl. r=gfx-reviewers,aosmond
This adds interpolants to the AA distance calculation to handle the AA'ing of
the clip rect.

Differential Revision: https://phabricator.services.mozilla.com/D174650
2023-04-05 15:52:36 +00:00
Kelsey Gilbert 58bc15010f Bug 1804368 - Add webgl.forbid-software/forbid-hardware on Mac. r=gfx-reviewers,lsalzman
I would prefer to leave "this doesn't work on linux/windows/android as open bugs to be handled later.

Differential Revision: https://phabricator.services.mozilla.com/D164016
2023-04-03 21:25:41 +00:00