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

37842 Коммитов

Автор SHA1 Сообщение Дата
Kartikaya Gupta 4e09d8469b Bug 1656071 - Record profiler stats into captures to assist with debugging talos regressions. r=kvark
This adds a profiler-stats.txt file to captures that dumps the profiler
stats, if those are being recorded. They get recorded if the profiler is
visible, or if the (newly added) PROFILER_CAPTURE debug option is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D85592
2020-07-31 16:48:34 +00:00
Jeremy Ir 92b8f0f77a Bug 1531609 part 1 - Rename overflow:-moz-hidden-unscrollable to overflow:clip. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D73716
2020-07-31 16:40:48 +00:00
Robert Mader dd996a396b Bug 1656472 - [X11] Drop CopySubBufferMESA and add SwapBuffersWithDamage support, r=nical
This largely reverts D81868, only keeping what's needed to make SwapBuffersWithDamage
work, and also adds BufferAge support to RenderCompositorOGL.

Differential Revision: https://phabricator.services.mozilla.com/D85565
2020-07-31 16:13:54 +00:00
Dzmitry Malyshau 0bb68197b7 Bug 1652750 - Unroll WR scene building recursion r=gw
instead of using the stack for all the scene building containers,
we are making the stack explicitly, and doing all the work inside the
`build_all` function. This affects reference frames, iframes, and stacking
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D85467
2020-07-31 12:25:51 +00:00
Nicolas Silva 47e10e7eae Bug 1655717 - Fix border-image fill area. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D85310
2020-07-31 08:46:35 +00:00
Martin Stransky 55005b2f5b Bug 1655747 [Linux] Implement SurfaceFormat::YUV format for DMABUFTextureHostOGL, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D85270
2020-07-30 18:52:40 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Imanol Fernandez 0c20e550e5 Bug 1655006 - Implement WebXR nativeFramebufferScaleFactor. r=jgilbert,kip,daoshengmu
Clamp the requested XRWebGLLayer framebuffer size to ensure it's not too small to see or larger than the max native resolution.

Differential Revision: https://phabricator.services.mozilla.com/D84799
2020-07-29 10:00:53 +00:00
Jamie Nicol e3085373f9 Bug 1656210 - Update glslopt version to fix FreeBSD/Dragonfly build. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D85394
2020-07-30 15:23:03 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Jonathan Kew 95e0f6f509 Bug 1655364 - Rename gfxShapedText::SetGlyphs to SetDetailedGlyphs and make it just set glyph information, not clobber character-type flags. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D85187
2020-07-30 11:48:06 +00:00
Mihai Alexandru Michis 78c470dbaa Backed out changeset 3c88adc13a06 (bug 1655364) for causing assertion failures regarding glyphs.
CLOSED TREE
2020-07-30 13:25:04 +03:00
Kartikaya Gupta f624885e29 Bug 1484047 - Fix glitching of offset value. r=gw
Based on the documentation of the `offset` field in a previous patch, it
doesn't make sense to be adjusting this field when getting a new display
list. The external_scroll_offset may change, but the user-visible offset
should be preserved.

This incorrect adjustment caused the `offset` field to hold an incorrect
value in the interval between applying the new display list and re-sampling
the async scroll delta from APZ. Although this would never appear to the
user in a composited frame, hit-tests during this interval could end up
returning the wrong result.

Differential Revision: https://phabricator.services.mozilla.com/D85333
2020-07-30 09:46:07 +00:00
Kartikaya Gupta 9434fdc6d9 Bug 1484047 - Document some scroll-related things better. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D85331
2020-07-30 09:46:00 +00:00
Jonathan Kew ab3b20c648 Bug 1655364 - Rename gfxShapedText::SetGlyphs to SetDetailedGlyphs and make it just set glyph information, not clobber character-type flags. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D85187
2020-07-30 07:56:05 +00:00
Lee Salzman 8e75f6a29c Bug 1655883 - support RG8 textures in SWGL. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D85218
2020-07-30 03:25:38 +00:00
Hiroyuki Ikezoe 63133b1845 Bug 1640835 - Bail out early from InputQueue::MainThreadTimeout if sControllerThread has been already discarded. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D85335
2020-07-29 23:25:11 +00:00
Cameron McCormack 8b18ae5fbf Bug 1655394 - Add a Dump Text Runs command to the Layout Debugger. r=TYLin,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D84953
2020-07-29 22:31:19 +00:00
Markus Stange 6657cec9cd Bug 1654091 - Widen the biasing threshold to 1.5ms. r=nical
We still keep the actual biasing amount (BIAS_TIME_MS) at 1.0ms.

This makes it possible to switch from negative bias to positive bias in an
instant, at the frame that is repeated. Here's how:

While the bias is negative, it means that we're allowed to pick frames up to
1.0ms in the future. But we've drifted far enough that the next frame's
timestamp is more than 1.0ms in the future, for example 1.3ms, we cannot pick
it, so we're at a composite that repeats a frame. This is the point where we
want to switch to positive bias. In order to switch to positive bias, the next
frame's timestamp must be within the biasing threshold of the current
composition time. But if that threshold is at 1.0ms, then the 1.3ms falls
outside of that and we keep the negative bias, which is bad. With the widened
threshold of 1.5ms, we successfully switch to the positive bias in that case.

There would be no harm in keeping the negative bias if the video frames were
going to be *consistently* further than 1.0ms away from the composition time
from now on, because then even a negative bias would not make them eligible to
be picked. But whenever we have small fluctuations, which is the case when we
actually *need* the bias for consistent playback, it means that the next frame
might again be within 1.0ms of the composition time, and the negative bias would
cause a frame to be skipped.

One source of such fluctuations is the fact that WebM video frames only have
*integer millisecond* precision on their timestamps. That means they're off by
up to 0.5ms from their desired timestamp.

So the frame that's 1.3ms in the future could be one that was supposed to be at
composition time + 0.9ms, but happened to be off by 0.4ms from its desired
timestamp due to the integer millisecond restriction. This frame could then be
followed by another frame that also wanted to be at +0.9ms (compared to the next
frame's composition time), but ended up being at +0.6ms. So at that point it is
important to no longer have the negative bias, because otherwise a frame would
be skipped.

Profile before: https://share.firefox.dev/3hnOOtk
Profile after: https://share.firefox.dev/3fIfEf4

Differential Revision: https://phabricator.services.mozilla.com/D84285
2020-07-29 17:58:02 +00:00
Markus Stange 54a827c69b Bug 1654091 - Add a profiler marker for the current and next video frame timestamp offsets from the composition time. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D84284
2020-07-29 17:57:50 +00:00
Markus Stange 5378e91316 Bug 1654091 - Update ImageComposite bias even on frames where the video frame doesn't update. r=nical
However, don't reset the bias to NONE in those cases.

Differential Revision: https://phabricator.services.mozilla.com/D84283
2020-07-29 17:57:44 +00:00
Markus Stange 065fee4b72 Bug 1654091 - Pick the frame in the first call to ChooseImageIndex and then don't look at timestamps again for the remainder of the composition. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D84282
2020-07-29 17:57:16 +00:00
Markus Stange e6843fbb07 Bug 1654091 - Make these two fields private rather than protected. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D84281
2020-07-29 17:57:09 +00:00
Kartikaya Gupta ef3da56727 Bug 1655102 - Don't record a scroll payload if we don't expect scrolling to happen. r=botond
This is a bit of a spot fix for the specific scenario encountered. If there are
other scenarios in which we encounter a similar problem we should consider a
higher level fix.

Differential Revision: https://phabricator.services.mozilla.com/D85290
2020-07-29 15:58:58 +00:00
Jamie Nicol 6423c052ae Bug 1637148 - Update glslopt to fix intermittent build error. r=lsalzman
Update webrender's dependency on glslopt to 0.1.4. This includes an updated version of Mesa, which
has fixed a race condition that was causing intermittent build failures.

Differential Revision: https://phabricator.services.mozilla.com/D85254
2020-07-29 15:12:38 +00:00
sotaro 8537b85e41 Bug 1655900 - Fix crash by using Software WebRender on Windows r=nical
This is a short term fix just for addressing a crash.

Differential Revision: https://phabricator.services.mozilla.com/D85236
2020-07-29 06:59:52 +00:00
Timothy Nikkel 66f908a785 Bug 1655242. When a relative scroll offset update comes in during a smooth scroll animation make the new destination be based on the existing destination, not the current scroll position. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D84904
2020-07-29 05:23:17 +00:00
Timothy Nikkel 825a2f5d27 Bug 1655780. Hold mutex while accessing mState in AsyncPanZoomController::HandleDragEvent. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D85214
2020-07-29 01:44:45 +00:00
Dorel Luca 35624700be Backed out changeset 37c23ef47c31 (bug 1625249) for Browser-chrome failures in browser_test_hittest_svg_over_iframe.js. CLOSED TREE 2020-07-29 07:27:37 +03:00
Dzmitry Malyshau 3d822b4eda Bug 1652972 - Mark EGL context as lost on Shutdown() r=aosmond
This is meant to save us in cases where the message loop in GPU process
receives commands related to resources that point to the old EGL context
that was just shut down. Since the symbols are erased, we'd end up with
trying to execute a nullptr on `MakeCurrent()`. With marking the context
as lost, however, no symbols will be accessed.

Differential Revision: https://phabricator.services.mozilla.com/D84868
2020-07-29 02:33:54 +00:00
Dzmitry Malyshau 544f262737 Bug 1653161 - Implement Queue.writeBuffer and writeTexture in WebGPU r=jgilbert,webidl,smaug
Updates wgpu to bd50867bb8c66ac9dec50046d066c02b8f7a3fc1

Differential Revision: https://phabricator.services.mozilla.com/D83734
2020-07-28 22:26:21 +00:00
Yura Zenevich cbbcea31ff Bug 1625249 - test hittest with SVG in parent over OOP iframe. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D69664
2020-07-29 02:27:43 +00:00
Markus Stange 3325824c2d Bug 1653355 - Also use the output time for picking video frames in non-WebRender. r=nical
Depends on D83830

Differential Revision: https://phabricator.services.mozilla.com/D84112
2020-07-20 20:12:24 +00:00
Markus Stange 62c9e985a3 Bug 1653355 - Pick video frames based on the vsync output time. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D83830
2020-07-20 20:12:24 +00:00
Glenn Watson 4106c6fdd1 Bug 1623792 - Only push pass-through picture clips onto clip stack. r=kvark
If the picture isn't a pass-through, any clips attached to it are
handled when compositing that picture into its parent. Thus, we
don't need to push those clips onto the clip stack for child
primitives.

This is probably not a noticeable performance win, but it's worth
doing to ensure it doesn't regress anything. A follow up commit will
remove the push_clip in this path completely, which will unblock
some other clip-chain optimization work.

Differential Revision: https://phabricator.services.mozilla.com/D84763
2020-07-23 23:48:10 +00:00
sotaro 58ce4ff546 Bug 1655395 - Remove MOZ_ALWAYS_TRUE from RenderDXGITextureHostOGL r=nical
MOZ_ALWAYS_TRUE causes process abort on failure. we do not want the process abort with false.

The failure could happen when context is lost. It is not necessary to handle the context lost in RenderDXGITextureHostOGL. It is already handled by RendererOGL.

Differential Revision: https://phabricator.services.mozilla.com/D85116
2020-07-28 07:21:26 +00:00
Nicolas Silva 255da40c5d Bug 1648405 - Use crossbeam channels instead of std::mpsc ones in webrender. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D81040
2020-07-28 09:43:58 +00:00
Jonathan Kew 60bda2f7ba Bug 1647573 - Always check FamilyFace::FontEntry() for null before trying to use the pointer, as it can fail. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D84518
2020-07-28 11:13:00 +00:00
Jonathan Kew eb8be4d270 Bug 1648355 - When doing a global font fallback search, load cmaps eagerly in the parent process. r=jwatt
This reduces IPC traffic, and avoids the (severe) impact of file access interception
and proxying by the sandbox on DirectWrite in content processes.

Differential Revision: https://phabricator.services.mozilla.com/D83240
2020-07-22 21:12:11 +00:00
Jonathan Kew 1fb489dfe7 Bug 1654470 - Improve font selection heuristics for character sequences that should get emoji-style presentation. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D84703
2020-07-28 07:40:54 +00:00
Olli Pettay bccd166233 Bug 1654088, make WindowWatcher methods to use CStrings and not char and make window.open throw the correct exception, r=farre,geckoview-reviewers,agi*
Differential Revision: https://phabricator.services.mozilla.com/D84604
2020-07-27 21:36:24 +00:00
Glenn Watson bfe5060361 Bug 1623792 - Pt 8 - Add IS_IDENTITY to spatial node flags. r=jnicol
Add a new flag for spatial nodes that identifies if the spatial
node is guaranteed to be identity (no transformation at all) for
the entirety of the scene (i.e. either a fixed identity reference
frame or a redundant scroll frame).

Although not used yet, this will be useful in future to help
remove clips during scene building that can't possibly affect
the content rendering no matter what occurs during frame building.

At the same time, port the other bool fields in spatial node into
a single bitflags.

Differential Revision: https://phabricator.services.mozilla.com/D84957
2020-07-27 09:56:59 +00:00
Timothy Nikkel 95a2087dea Bug 1655237. In AsyncPanZoomController::HandleDragEvent only clear the state on mouse ups if we were in the scrolbar dragging state. r=botond
If a user clicks on a scrollbar track (but not the thumb) we start a smooth scroll animation and set the state as smooth scroll to do the page scroll, but when we receive the mouse up we clear the state even though the animation still proceeds (in most cases the animation still runs to completion fine).

Differential Revision: https://phabricator.services.mozilla.com/D84903
2020-07-27 16:09:36 +00:00
Jeff Muizelaar 78402acff4 Bug 1655298 - Pass in MallocSizeOfOps to reporter. r=gw
Just passing this along with the report is easier than
trying to store these functions some place as we do in other places.

These ops aren't used yet but will be in subsequent patches.

There's a bit of ugly around the bindings because of a cbindgen
limitation.

Differential Revision: https://phabricator.services.mozilla.com/D84916
2020-07-27 02:55:47 +00:00
Botond Ballo dde4325651 Bug 1637776 - Add a mochitest for bug 1637135. r=tnikkel
Depends on D84892

Differential Revision: https://phabricator.services.mozilla.com/D84893
2020-07-25 04:46:57 +00:00
Botond Ballo f0519a5b18 Bug 1637776 - Add a mochitest for bug 1638441. r=tnikkel
Depends on D84891

Differential Revision: https://phabricator.services.mozilla.com/D84892
2020-07-25 04:45:48 +00:00
Botond Ballo d3cc9a0b37 Bug 1637776 - Rewrite the test for bug 1637113 in the async/await style. r=tnikkel
The test is also revised to fail immediately rather than via a timeout
if the expected event is fired but targets the wrong element.

Differential Revision: https://phabricator.services.mozilla.com/D84891
2020-07-25 04:43:18 +00:00
Jonathan Kew 4fc6d8448e Bug 1654501 - Add assertions to confirm the font family lists are properly sorted. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D84730
2020-07-26 11:08:50 +00:00
Jonathan Kew f2da1388c8 Bug 1654501 - Fix incorrectly sorted entries in the lists of standard Windows fonts. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D84714
2020-07-26 18:10:04 +00:00
Robert Mader 1e96614739 Bug 1654687 - Remove some more GTK3-version related checks, r=stransky
They are all present since 3.8. Also bumb a version check.

Differential Revision: https://phabricator.services.mozilla.com/D84899
2020-07-26 13:20:13 +00:00
Coroiu Cristina 39ef681feb Backed out 2 changesets (bug 1654501) for assertion failures at gfxPlatformFontList.cpp
Backed out changeset cb233beadbe1 (bug 1654501)
Backed out changeset 1fe3b54b7095 (bug 1654501)
2020-07-26 13:53:23 +03:00
Jonathan Kew 56b38c0de2 Bug 1654501 - Add assertions to confirm the font family lists are properly sorted. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D84730
2020-07-26 09:31:26 +00:00
Jonathan Kew 8424869f6a Bug 1654501 - Fix incorrectly sorted entries in the lists of standard Windows fonts. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D84714
2020-07-26 09:31:26 +00:00
Butkovits Atila 68e6d1c762 Backed out changeset 4b66ae956966 (bug 1640960) as requested by kvark. CLOSED TREE 2020-07-26 08:50:47 +03:00
Botond Ballo 7be4e87b56 Bug 1637776 - Add a mochitest for bug 1638458. r=tnikkel
Depends on D84882

Differential Revision: https://phabricator.services.mozilla.com/D84883
2020-07-25 04:12:14 +00:00
Nika Layzell 09b3c13a42 Bug 1648955 - Stop process changing loads in inactive subframes, r=mattwoodrow,annyG
Differential Revision: https://phabricator.services.mozilla.com/D84752
2020-07-24 22:19:38 +00:00
Jeff Muizelaar b083673982 Bug 1654699. Update core-foundation/core-graphics. r=kvark,keeler,jcj,chunmin
This includes updates to authenticator, cubeb-coreaudio,
metal, gfx-backend-vulkan, gfx-backend-metal, freetype

libloading is duplicated because of ash

Differential Revision: https://phabricator.services.mozilla.com/D84688
2020-07-24 22:35:25 +00:00
Kartikaya Gupta 9b5fd8555c Bug 1655083 - Tweak sampled APZC scroll offset to prevent unnecessary temporary surface creation. r=botond
Sometimes when sampling the APZC state we get a tiny non-zero async scroll
delta to be applied to the layer transform. This is not user-visible but it
does end up creating temporary surfaces in the layers code, and so is
undesirable. We can avoid this by tweaking the sampled APZC scroll offset
slightly. See comments in the patch for details.

Differential Revision: https://phabricator.services.mozilla.com/D84855
2020-07-24 20:02:40 +00:00
Csoregi Natalia ea1ddfabbf Backed out changeset 9702b4a4f53c (bug 1654699) for Gtest failures. CLOSED TREE 2020-07-24 21:29:52 +03:00
Jeff Muizelaar b17ab0c2e7 Bug 1654699. Update core-foundation/core-graphics. r=kvark,keeler,jcj,chunmin
This includes updates to authenticator, cubeb-coreaudio,
metal, gfx-backend-vulkan, gfx-backend-metal, freetype

libloading is duplicated because of ash

Differential Revision: https://phabricator.services.mozilla.com/D84688
2020-07-24 15:59:54 +00:00
Nicolas Silva d93c5bb4f4 Bug 1653615 - Add a test. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D84659
2020-07-23 13:50:10 +00:00
Dzmitry Malyshau 4569cc4aa1 Bug 1654901 - Make WR primitives invisible when failing to prepare for rendering r=gw
the problem was that paths that determined visibility were not switching it off
on the primitive instance. Now it's moved one level higher.

Differential Revision: https://phabricator.services.mozilla.com/D84762
2020-07-23 23:29:54 +00:00
Jeff Muizelaar 81afea999f Bug 1654929. Drop old FBOs that we haven't used in a while. r=gw
This keeps us from accumulating frame buffers without bound.
Previously I was seeing as many 56 frame buffers in this list
during a tab cycling stress test.

Differential Revision: https://phabricator.services.mozilla.com/D84760
2020-07-24 00:04:55 +00:00
Mihai Alexandru Michis c3d9e17fa4 Backed out changeset 45fc4a780b2b (bug 1654699) for causing failures regarding AudioStream position.
CLOSED TREE
2020-07-23 23:13:52 +03:00
Lee Salzman da45058f08 Bug 1649676 - use fallback font if loading WR mac font descriptor fails. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D84625
2020-07-23 13:34:36 +00:00
tkhan e778811453 Bug 1653400 - Add xorigin and fission annotations, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D84006
2020-07-23 18:05:05 +00:00
Jeff Muizelaar 4b666af85b Bug 1654699. Update core-foundation/core-graphics. r=kvark,keeler,chunmin
This includes updates to authenticator, cubeb-coreaudio,
metal, gfx-backend-vulkan, gfx-backend-metal, freetype

libloading is duplicated because of ash

Differential Revision: https://phabricator.services.mozilla.com/D84688
2020-07-23 17:01:14 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Nicolas Silva a1adedf053 Bug 1654279 - Avoid some allocations in ClipChainStack::push_surface. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D84498
2020-07-22 20:17:09 +00:00
Dzmitry Malyshau 1be0f732d4 Bug 1640960 - Remove aPosition from all shaders, except debug ones r=gw,jrmuizel
we only draw quads, and for quads we have a fixed vertex buffer with positions.
If we get stop using instancing, we'll no longer have the luxury of 4 vertices there.
Given that they are trivial to compute, it seems simpler to just do that in the shader today.
So this PR is a required step on the way to instance-less rendering.

It appears that we are hitting a driver bug with Intel on macOS, where scissored clears don't work properly if we render without per-vertex attributes.
It doesn't make a ton of sense, but switching to quad clears appears to fix it for me. Added the corresponding entry to the wiki - https://github.com/servo/webrender/wiki/Driver-issues#bug-1652763---glitches-on-macos-intel-with-clears

Differential Revision: https://phabricator.services.mozilla.com/D83391
2020-07-23 05:49:14 +00:00
Timothy Nikkel 227f22acef Bug 1651332. Use purely relative scroll offset updates for many scrollbar initiated scrolls. r=kats
This patch basically attempts to make clicking in the scrollbar track outside of the scrollthumb "work". Clicking in the scrollbar track usually does a page scroll via nsSliderFrame::PageScroll. This eventually ends up in ScrollFrameHelper::ScrollBy where we turn the request from a relative one ("scroll by a page") into an absolute one ("scroll to this position").

This page scroll is typically a smooth scroll and is currently done on the main thread/layout side. Once we start scrolling the visual viewport offset with the scrollbars we can no longer do this purely on the layout side, we at least need the help of the compositor side. I think the simplest way to do this is to hand the scroll request off to the compositor and have it handle the whole thing.

Now we need to consider the following situation: user clicks scrollbar track to page scroll, smooth scroll gets partway complete on the compositor, user clicks again on scrollbar track for a further page scroll. The main thread can't send an absolute scroll offset update request to the compositor at this point because it has outdated information (it needs a 'starting position' to add the page scroll offset amount) so it'll end up scrolling to the wrong place. It has to send a relative scroll offset update.

We already have a mechanism to send relative scroll offset updates. It is implemented by sending a base scroll offset and the desired scroll offset, and then on the compositor send the difference between those two is computed and then added to the scroll offset.

This patch creates a new mechanism (so called "pure relative") that just sends a relative offset update without any absolute scroll positions. The reason I did this is because the existing relative scroll offset update mechanism is not aware of visual viewport offsets, but rather only layout scroll position. For example, here

https://searchfox.org/mozilla-central/rev/8d55e18875b89cdf2a22a7cba60dc40999c18356/layout/generic/nsGfxScrollFrame.h#446

the value we use for the base scroll offset (mApzScrollPos) is set to the layout scroll position. It may be entirely reasonable to make this existing mechanism vv offset aware, but I wanted to implement something to get it working with a smaller chance of regressions to things that already exist and work. Ideally these two mechanims would be merged.

Differential Revision: https://phabricator.services.mozilla.com/D82688
2020-07-19 14:56:24 +00:00
Timothy Nikkel 758a942781 Bug 1651332. Update how the compositor adjust scroll thumbs. r=kats
Now that layout places the scroll thumbs at the visual viewport offset instead of the layout scroll position we need to update how the compositor adjusts them.

Differential Revision: https://phabricator.services.mozilla.com/D82686
2020-07-19 10:04:24 +00:00
Timothy Nikkel 9665488d31 Bug 1651332. Create a pref to gate the new scrollbar code on. r=kats
I could have use apz.allow_zooming but using a separate pref means we can flip the pref to check if the new scrollbar code is the source of a regression. Also I haven't tested the code on Fenix at all, so we can disable it there for now.

Differential Revision: https://phabricator.services.mozilla.com/D82684
2020-07-19 10:04:04 +00:00
Glenn Watson 688dec329b Bug 1654705 - Add a reftest to ensure that scroll frames can be defined and used in any order. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D84628
2020-07-23 01:02:24 +00:00
Kartikaya Gupta be4a5c613a Bug 1654353 - Nudge the transform matrix to integers before checking for integer axis alignment. r=mattwoodrow
This avoids creating temporary surfaces in cases where we get a transform
matrix that's not axis-aligned integers but only because of floating point
inaccuracy.

Differential Revision: https://phabricator.services.mozilla.com/D84410
2020-07-22 23:35:10 +00:00
Andrew Osmond 6cfed64163 Bug 1650748 - Prevent DMABUF usage with GLX. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D84256
2020-07-22 18:58:11 +00:00
Glenn Watson 9b6522dda6 Bug 1654442 - Add primitives to picture cache slices earlier during scene building r=nical
Previously, scene building added all primitives to the picture tree, and then
sliced the top level picture up into picture cache slices as a post-process.

Now, primitives are added to picture cache slices as the main picture tree
is built.

In the rare case of ending up with too many picture cache slices, they
are combined into a single picture cache. This means that the common
case (the scene has a reasonable number of slices) is faster, since there
is no need to split up an array of primitives into multiple slices.

This is an optimization to scene building time, for the above reason as well
as avoiding another picture tree traversal. However, the primary benefit is
that we can know much earlier what the shared_clips are that make up each
picture cache slice. Follow up commits will take advantage of this to remove
much of the clip-chain related work that is currently done for every frame build.

Differential Revision: https://phabricator.services.mozilla.com/D84461
2020-07-22 20:51:52 +00:00
Kartikaya Gupta bbf55b1e31 Bug 1654652 - Remove unused bindings left over from document splitting. r=jrmuizel
More leftover stuff from the document splitting effort. I'm leaving in the
corresponding APIs in webrender_api in case other consumers of WebRender
are using it.

Differential Revision: https://phabricator.services.mozilla.com/D84590
2020-07-22 20:16:54 +00:00
Dzmitry Malyshau fc399d032a Bug 1642495 - Switch all WebRender HW-accelerated GPU cache updates to Scatter r=gw
scattered GPU updates use data transfers most efficiently, since
they need a single slice of a buffer to do all the updates per frame, instead
of uploading each small section of a row independently.

Differential Revision: https://phabricator.services.mozilla.com/D78342
2020-06-16 19:28:03 +00:00
Simon Giesecke 548e423dad Bug 1654469 - Stop generating operator==/operator != for IPDL structs/unions by default. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D84485
2020-07-22 17:24:33 +00:00
Kartikaya Gupta 2c884ed990 Bug 1654373 - Save captures to MOZ_UPLOAD_PATH if that is set. r=kvark
This makes it possible to download the capture from the artifacts of the
CI job. It would be nicer if the capture were written to a tarball/zipfile,
but having to download the files individually is better than nothing.

Depends on D84422

Differential Revision: https://phabricator.services.mozilla.com/D84423
2020-07-22 15:52:04 +00:00
Jeff Gilbert 35f892e782 Bug 1607940 - Stand up webgl.out-of-process:true path. r=handyman,nika,froydnj
* Use clearer pref names.
* Default (and only support) IPDL dispatching.
* Make DispatchCommands async-only.
* Sync ipdl command per sync webgl entrypoint.
  * Eat the boilerplate cost, since there's not too many.
* Run SerializedSize off same path as Serialize.
* All shmem uploads go through normal DispatchCommands.
* Defer pruning of dead code for now so we can iterate quickly.
* Use Read/Write(begin,end) instead of (begin,size).
  * This would have prevented a bug where we read/wrote N*sizeof(T)*sizeof(T).

Differential Revision: https://phabricator.services.mozilla.com/D81495
2020-07-21 22:56:52 +00:00
Markus Stange 8dd9fb9216 Bug 1654040 - Add an ImageComposite::SetImages marker that records the supplied frameIDs. r=nical
Depends on D84212

Differential Revision: https://phabricator.services.mozilla.com/D84213
2020-07-21 07:46:45 +00:00
Markus Stange e0836b8642 Bug 1654040 - Add the number of remaining images in mImages to the UpdateCompositedFrame compositor marker. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D84212
2020-07-21 07:45:26 +00:00
Jonathan Kew 1428623376 Bug 1653987 - When privacy.resistFingerprinting is true, override font-visibility setting to allow Base fonts only. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D84181
2020-07-21 14:28:36 +00:00
Simon Giesecke 75e36d4ce3 Bug 1653193 - Hide complex template instance PrimitiveAttributes. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D83751
2020-07-21 08:39:35 +00:00
Hiroyuki Ikezoe ba018e2355 Bug 1638152 - Jank partial prerender transform animations and report the janked animations to the main-thread in each process on WebRender. r=botond,kats
Differential Revision: https://phabricator.services.mozilla.com/D83202
2020-07-21 10:03:34 +00:00
Hiroyuki Ikezoe c746275523 Bug 1638152 - Inform transform value in the clip rectangle and the offset from the reference frame for the partial pre-render check on WebRender. r=botond
On WebRender there is no layer tree structures so that we can't accumulate
transform values up to the nearest APZ's scroll layer by walking up the layer
tree, or we can't tell a given transform animation is inside a perspective layer
to decide whether we need to apply the offset from the reference frame or not
[1]. So we get the accumulated transform by using
nsLayoutUtils::GetTransformToAncestor on the main-thread and inform it to the
compositor thread, and also inform the offset which is set conditionally [2]
so that we don't need to tell whether the transform animation is inside a
perspective layer or not on the compositor thread.

I am not yet 100% sure that these values are same both on WebRender and non
WebRender in all cases, once after partial pre-rendering transforms have
been used in the wild well enough and any problem has not appeared, even if
there are problems we should fix them then the non WebRender version should
eventually use this same setup instead of walking up the layer tree.

[1] https://searchfox.org/mozilla-central/rev/85ae3b911d5fcabd38ef315725df32e25edef83b/gfx/layers/CompositorAnimationStorage.cpp#273-275
[2] https://searchfox.org/mozilla-central/rev/85ae3b911d5fcabd38ef315725df32e25edef83b/layout/painting/nsDisplayList.cpp#7879-7891

Differential Revision: https://phabricator.services.mozilla.com/D83201
2020-07-21 10:09:06 +00:00
Nicolas Silva f7a9a069e0 Bug 1653649 - Add window size sanity check at the API level. r=kvark
Better to catch these in the API than later on some other thread.

Differential Revision: https://phabricator.services.mozilla.com/D84192
2020-07-21 04:12:57 +00:00
Hiroyuki Ikezoe 2cec69d8c5 Bug 1652190 - Don't expand the composition size including the dynamic toolbar height if the root content is not scrollable. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D83601
2020-07-21 02:53:09 +00:00
Botond Ballo 04d0eeb3e6 Bug 1654107 - Fix non-unified build errors in CompositorAnimationStorage.{h,cpp}. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D84258
2020-07-20 23:05:46 +00:00
Gerald Squelart 36b44f809a Bug 1654106 - Check that image timestamps are not null before subtracting them - r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D84257
2020-07-20 22:50:34 +00:00
Ting-Yu Lin fdc00547f6 Bug 1637130 - Rename visual overflow to ink overflow. r=dbaron
This patch is generated by:

```
# Rename the nsOverflowType enum.
rg -l "eVisualOverflow" layout/ gfx/ | xargs sed -i "s/eVisualOverflow/eInkOverflow/g"

# Rename and drop the "Get" prefix from various functions.
rg -l "GetVisualOverflowRect" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowRect/InkOverflowRect/g"
rg -l "GetPreEffectsVisualOverflowRect" layout/ gfx/ | xargs sed -i "s/GetPreEffectsVisualOverflowRect/PreEffectsInkOverflowRect/g"
rg -l "GetVisualOverflowFromDeltas" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowFromDeltas/InkOverflowFromDeltas/g"
rg -l "GetScrollableOverflowRect" layout/ gfx/ | xargs sed -i "s/GetScrollableOverflowRect/ScrollableOverflowRect/g"

# Rename, drop the "Get" prefix, and change the suffix "Area" to "Rect"
# (because they return nsRect) for the two methods in nsLineBox.
rg -l "GetVisualOverflowArea" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowArea/InkOverflowRect/g"
rg -l "GetScrollableOverflowArea" layout/ gfx/ | xargs sed -i "s/GetScrollableOverflowArea/ScrollableOverflowRect/g"

# Rename rest of the functions and variables.
rg -l "VisualOverflow" layout/ gfx/ | xargs sed -i "s/VisualOverflow/InkOverflow/g"
rg -l "visual overflow" layout/ gfx/ | xargs sed -i "s/visual overflow/ink overflow/g"
rg -l "visualOverflow" layout/ gfx/ | xargs sed -i "s/visualOverflow/inkOverflow/g"
rg -l "visOverflow" layout/ gfx/ | xargs sed -i "s/visOverflow/inkOverflow/g"
rg -l "vis-overflow" layout/ gfx/ python/ | xargs sed -i "s/vis-overflow/ink-overflow/g"

./mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D84231
2020-07-20 20:17:36 +00:00
Kartikaya Gupta 023457eb88 Bug 1540988 - Don't do trackpad-based pinch zooming if keyboard modifiers are present. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D84204
2020-07-20 21:13:23 +00:00
Markus Stange 7580893a66 Bug 1578042 - Call UpdateCompositedFrame from ChooseImageIndex so that the frame drop detection works for non-WebRender too. r=nical
Non-WebRender calls ChooseImageIndex multiple times per frame, and only calls
FinishRendering if it actually rendered the video. This makes some of the
bookkeeping here a bit annoying.

This patch introduces a behavior difference as to when mLastFrameID is updated.
It is now updated during the first ChooseImageIndex inside of a composition,
rather than from FinishRendering. But the bias is still updated from
FinishRendering. I don't think this will make an actual difference in practice.

Differential Revision: https://phabricator.services.mozilla.com/D84072
2020-07-20 21:47:07 +00:00
Markus Stange 4b63e322bb Bug 1578042 - Move mCompositionOpportunityId incrementing from EndTransaction to UpdateAndRender. r=nical
I got this wrong when I added non-WebRender support in the patch that added
the CompositionOpportunityId counter. I forgot that EndTransaction is not only
called when we composite, but also, who would have thought, when we process a
transaction.
We only want to increment mCompositionOpportunityId when we're actually about
to composite.

Differential Revision: https://phabricator.services.mozilla.com/D84111
2020-07-20 21:47:07 +00:00
Markus Stange 4ad4e1f8c8 Bug 1578042 - Ignore skipped frames when the video was offscreen. r=jya,nical
This patch makes it work for WebRender. The next patch in the series makes it
work for non-WebRender, too.

Differential Revision: https://phabricator.services.mozilla.com/D83463
2020-07-20 21:47:07 +00:00
Markus Stange 113bd0f12f Bug 1578042 - Improve dropped frames reporting for videos, by counting all frames in mImages that were never composited. r=jya,nical
In the current state this also counts frame drops while the video is offscreen,
but this will be fixed in a later patch in the series.

This patch also adjusts the time delta check: It now compares floored milliseconds.
In 60fps WebM videos, the video frame durations are 16.0, 17.0, 17.0, 16.0, 17.0, 17.0, ...
so we need to consider frames with 16.0ms as displayable even when the target
frame duration is 16.67ms, otherwise we gloss over one third of the frames when
counting potentially dropped frames.

Differential Revision: https://phabricator.services.mozilla.com/D82635
2020-07-20 21:56:21 +00:00
Bogdan Tara b255bc7e5e Backed out 4 changesets (bug 1578042) for test_memory_usage.py crash CLOSED TREE
Backed out changeset 24d56f3c7678 (bug 1578042)
Backed out changeset e32e69b9bdc4 (bug 1578042)
Backed out changeset 3fbf9c0203dd (bug 1578042)
Backed out changeset 57f65280709f (bug 1578042)
2020-07-21 00:42:47 +03:00
Glenn Watson d28d1f3764 Bug 1623792 - Pt 7 - Remove space snapper from stacking context stack. r=aosmond
There doesn't seem to be any need to have this per stacking context, as
the device pixel ratio is always the same during scene building (the
previous code just clones this object as each stacking context is
pushed).

Differential Revision: https://phabricator.services.mozilla.com/D84113
2020-07-20 11:16:36 +00:00
Markus Stange ae1ef21e9c Bug 1654060 - Fix comments about positive bias for video frame timestamps. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D84225
2020-07-20 19:47:13 +00:00
Markus Stange 1a5c9783a1 Bug 1578042 - Call UpdateCompositedFrame from ChooseImageIndex so that the frame drop detection works for non-WebRender too. r=nical
Non-WebRender calls ChooseImageIndex multiple times per frame, and only calls
FinishRendering if it actually rendered the video. This makes some of the
bookkeeping here a bit annoying.

This patch introduces a behavior difference as to when mLastFrameID is updated.
It is now updated during the first ChooseImageIndex inside of a composition,
rather than from FinishRendering. But the bias is still updated from
FinishRendering. I don't think this will make an actual difference in practice.

Differential Revision: https://phabricator.services.mozilla.com/D84072
2020-07-20 16:20:53 +00:00
Markus Stange 664f21e124 Bug 1578042 - Move mCompositionOpportunityId incrementing from EndTransaction to UpdateAndRender. r=nical
I got this wrong when I added non-WebRender support in the patch that added
the CompositionOpportunityId counter. I forgot that EndTransaction is not only
called when we composite, but also, who would have thought, when we process a
transaction.
We only want to increment mCompositionOpportunityId when we're actually about
to composite.

Differential Revision: https://phabricator.services.mozilla.com/D84111
2020-07-20 16:20:24 +00:00
Markus Stange 1934ae99f2 Bug 1578042 - Ignore skipped frames when the video was offscreen. r=jya,nical
This patch makes it work for WebRender. The next patch in the series makes it
work for non-WebRender, too.

Differential Revision: https://phabricator.services.mozilla.com/D83463
2020-07-20 16:20:12 +00:00
Markus Stange 91f5573c75 Bug 1578042 - Improve dropped frames reporting for videos, by counting all frames in mImages that were never composited. r=jya,nical
In the current state this also counts frame drops while the video is offscreen,
but this will be fixed in a later patch in the series.

This patch also adjusts the time delta check: It now compares floored milliseconds.
In 60fps WebM videos, the video frame durations are 16.0, 17.0, 17.0, 16.0, 17.0, 17.0, ...
so we need to consider frames with 16.0ms as displayable even when the target
frame duration is 16.67ms, otherwise we gloss over one third of the frames when
counting potentially dropped frames.

Differential Revision: https://phabricator.services.mozilla.com/D82635
2020-07-20 16:19:51 +00:00
Nicolas Silva 54146b4c3e Bug 1650990 - Add the provided test case as a crashtest. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D84157
2020-07-20 13:03:41 +00:00
Kartikaya Gupta a115a91e05 Bug 1572421 - Tack on a temporary red zone to the data buffer for iteration. r=miko
When iterating a "built display list" the iterator expects there to be a red
zone at the end of the data buffer. The incremental display list emitter fakes
having a built display list, but it still needs to tack on the red zone to
satisfy the iterator (and assertions inside peek-poke). However we don't want
to keep this red zone there after we're done, so this patch also adds a new
method to peek-poke that strips away the red zone. The churn caused on the
vector capacity should be negligible because this churn would happen
anyway as new items are added to the display list and when the display list
is actually finalized at the end.

Differential Revision: https://phabricator.services.mozilla.com/D83788
2020-07-20 15:29:49 +00:00
Nicolas Silva 97f4e43c7b Bug 1653569 - Avoid memory allocations in area_of_occluders. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D83943
2020-07-19 22:06:54 +00:00
Nicolas Silva 7717eb1e38 Bug 1653544 - Add usueful information in the generated shaders. r=jnicol
This writes the shader name and list of featrues as a comment at the beginning of optimized shaders.

Differential Revision: https://phabricator.services.mozilla.com/D83960
2020-07-20 08:44:24 +00:00
Markus Stange 97287dc1b1 Bug 1653737 - Expose vsync output time from CompositorVsyncScheduler. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D83829
2020-07-18 05:17:39 +00:00
Markus Stange ccdf0c3561 Bug 1653737 - Add output time to VsyncEvent. r=nical
This timestamp is provided by the system on macOS, and estimated as "the next
vsync" on all other platforms.

On macOS, the output time increments in very consistent amounts. The timestamp
is independent of when exactly the vsync callback ends up running, so it is less
vulnerable to unfortunate thread scheduling.
This makes it a more reliable source for picking video frames, for example.

Differential Revision: https://phabricator.services.mozilla.com/D83828
2020-07-18 05:34:35 +00:00
Markus Stange 2409c20ba8 Bug 1653679 - Propagate CompositionOpportunityId to ImageComposite. r=jya,nical
Differential Revision: https://phabricator.services.mozilla.com/D83462
2020-07-18 05:15:47 +00:00
Markus Stange 6e45b7bc9f Bug 1653679 - Add a CompositionOpportunityId counter. r=nical
This ID is different from the IDs we already have:
 - It is different from VsyncId because it doesn't skip numbers when composites
   are delayed.
 - It is different from RenderedFrameId because it also increases for no-op
   composites.
 - It is different from transaction IDs and epochs because it doesn't care about
   the content side, it just looks at compositing.

Differential Revision: https://phabricator.services.mozilla.com/D83461
2020-07-18 05:39:10 +00:00
Markus Stange b774886bec Bug 1653679 - Don't call UpdateCompositedFrame outside of a composition. r=jya,nical
Correctly indicate that we're not in a composition during SetDisplayList or
during empty transactions, by making sure the composition timestamp is null
outside of a composition.

We also now return 0 rather than -1 from the first call to ChooseImageIndex
outside of a composition, so that static images (like canvases) default to
the correct initial frame. We don't call ChooseImageIndex for them again once
we composite them.
This is different from non-WebRender, which would call ChooseImageIndex on
canvas layers during every composition.

This introduces a behavior difference for static images when WebRender is enabled:
Those images will no longer update mLastFrameID, because UpdateCompositedFrame
will not be called during a composition for them.

I'm also removing a comment that seems like it's unnecessarily duplicating
information from another comment a few lines further up. That other comment is
also easier to understand.

Differential Revision: https://phabricator.services.mozilla.com/D83460
2020-07-18 05:13:16 +00:00
Markus Stange facad836b6 Bug 1653679 - Move more logic into UpdateCompositedFrame. r=jya,nical
This also makes it so that UpdateBias for non-WebRender is only called when the
video frame changes. This mirrors the recent change that we made for WebRender
in bug 1652181. Non-WebRender only calls UpdateCompositedFrame when it actually
draws the video onto the screen, so when the video is the only thing that was
updating, the new behavior is equivalent. But the new behavior makes more sense
if you have a 30fps video and a 60fps animation running on a 60fps screen at the
same time - now the bias won't be accidentally reset every other frame.

Differential Revision: https://phabricator.services.mozilla.com/D83459
2020-07-18 05:05:27 +00:00
Markus Stange a176aa2b96 Bug 1653679 - Update mLastFrameID in a new method UpdateCompositedFrame. r=jya,nical
Differential Revision: https://phabricator.services.mozilla.com/D82634
2020-07-18 05:28:56 +00:00
Markus Stange faa8b623cc Bug 1653350 - Add a marker that shows variations in video frame timestamps. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D83832
2020-07-18 05:12:30 +00:00
Andrew Osmond cde8b9c40f Bug 1632005 - Check for context loss with WebRender with native GL. r=nical
Similar to ANGLE and WebGL, we should be checking if there is a device
reset after a render pass via the glGetGraphicsResetStatus API.

Additionally, we should allow for simulating a device reset on platforms
other than Windows when using WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D83937
2020-07-17 14:12:32 +00:00
Jonathan Kew c299dcbf9f Bug 1653577 - Add NS_ASSERTION to various failure cases in gfxDWriteFontList::MakePlatformFont, rather than just silently failing. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D83954
2020-07-17 14:04:49 +00:00
Lee Salzman 47223485af Bug 1653374 - fix SwCompositor dependency tracking to account for transitive overlap dependencies. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D83878
2020-07-17 02:50:26 +00:00
Lee Salzman 0cf364d42f Bug 1653413 - update DCLayerTree surface rects at end of frame. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D83867
2020-07-17 00:54:28 +00:00
Dzmitry Malyshau 9ebf2f339d Bug 1647918 - Refactor the clip task assignment logic in WR r=gw
There were cases where the clip task generation considered a primitive
to be invisible, while the rest of the code proceeded with an assumption
that the clip task was created.

Differential Revision: https://phabricator.services.mozilla.com/D82121
2020-07-12 20:33:01 +00:00
Razvan Maries e1a6f1c2ce Backed out 7 changesets (bug 1578042) for perma failures on TimeStamp.h. CLOSED TREE
Backed out changeset ff727e9821be (bug 1578042)
Backed out changeset 94159598ab2a (bug 1578042)
Backed out changeset e26e1db6309b (bug 1578042)
Backed out changeset 0e658297a2ba (bug 1578042)
Backed out changeset 035199ba3d5a (bug 1578042)
Backed out changeset 0306fe17b5aa (bug 1578042)
Backed out changeset b0d63daa5d60 (bug 1578042)
2020-07-17 02:09:40 +03:00
Lee Salzman c50a68e57e Bug 1645123 - avoid trapping instructions on Skia debug asserts. r=jrmuizel
clang may potentially insert trapping instructions when __builtin_unreachable() is used.
We need to ensure we do not use this intrinsic when asserts are disabled. To work around
this, we add a condition that is checked before entering the body of SK_ABORT.

Differential Revision: https://phabricator.services.mozilla.com/D83841
2020-07-16 19:56:29 +00:00
Markus Stange 3c42ca75be Bug 1578042 - Ignore skipped frames when the video was offscreen. r=jya,nical
This currently only works for WebRender. In non-WR, no frame drops are reported.

There are two reasons why it doesn't work for non-WR:
 - Non-WR currently does not increment the composition opportunity ID.
 - In non-WR, UpdateCompositedFrame is only called for videos when they are
   drawn. But this detection relies on it being called on every composite, if
   the video is part of the on-screen scene. (WR does that.)

To make this detection work for non-WR as well, we would need to address both
of those points. The latter point is somewhat tricky because non-WR calls
ChooseImageIndex many times throughout a composite, and we would need to choose
a point in the composite at which to "lock in" the image for that composite and
cache the image index on the ImageHost somewhere, and then also find a way to
reset that locked-in index in the next composite. I haven't come up with a way
to do that and I do not know if it is worth the effort.

Differential Revision: https://phabricator.services.mozilla.com/D83463
2020-07-16 03:37:03 +00:00
Markus Stange 8354dbbcf2 Bug 1578042 - Propagate CompositionOpportunityId to ImageComposite. r=jya,nical
Differential Revision: https://phabricator.services.mozilla.com/D83462
2020-07-16 08:47:49 +00:00
Markus Stange 8dfd00ccf3 Bug 1578042 - Add a CompositionOpportunityId counter and implement it for WebRender. r=nical
This ID is different from the IDs we already have:
 - It is different from VsyncId because it doesn't skip numbers when composites
   are delayed.
 - It is different from RenderedFrameId because it also increases for no-op
   composites.
 - It is different from transaction IDs and epochs because it doesn't care about
   the content side, it just looks at compositing.

It is currently not implemented for non-WR. In non-WR the video frame drop
detection wouldn't properly work anyway, because UpdateCompositedFrame is not
called on every composite for non-WR.

Differential Revision: https://phabricator.services.mozilla.com/D83461
2020-07-16 03:37:02 +00:00
Markus Stange 8b30d46d48 Bug 1578042 - Improve dropped frames reporting for videos, by counting all frames in mImages that were never composited. r=jya,nical
In the current state this also counts frame drops while the video is offscreen,
but this will be fixed in a later patch in the series.

This patch also adjusts the time delta check: It now compares floored milliseconds.
In 60fps WebM videos, the video frame durations are 16.0, 17.0, 17.0, 16.0, 17.0, 17.0, ...
so we need to consider frames with 16.0ms as displayable even when the target
frame duration is 16.67ms, otherwise we gloss over one third of the frames when
counting potentially dropped frames.

Differential Revision: https://phabricator.services.mozilla.com/D82635
2020-07-16 03:37:02 +00:00
Markus Stange e017879ff1 Bug 1578042 - Don't call UpdateCompositedFrame outside of a composition. r=jya,nical
Correctly indicate that we're not in a composition during SetDisplayList or
during empty transactions, by making sure the composition timestamp is null
outside of a composition.

We also now return 0 rather than -1 from the first call to ChooseImageIndex
outside of a composition, so that static images (like canvases) default to
the correct initial frame. We don't call ChooseImageIndex for them again once
we composite them.
This is different from non-WebRender, which would call ChooseImageIndex on
canvas layers during every composition.

This introduces a behavior difference for static images when WebRender is enabled:
Those images will no longer update mLastFrameID, because UpdateCompositedFrame
will not be called during a composition for them.

I'm also removing a comment that seems like it's unnecessarily duplicating
information from another comment a few lines further up. That other comment is
also easier to understand.

Differential Revision: https://phabricator.services.mozilla.com/D83460
2020-07-16 08:47:21 +00:00
Markus Stange 6d2c616de5 Bug 1578042 - Move more logic into UpdateCompositedFrame. r=jya,nical
This also makes it so that UpdateBias for non-WebRender is only called when the
video frame changes. This mirrors the recent change that we made for WebRender
in bug 1652181. Non-WebRender only calls UpdateCompositedFrame when it actually
draws the video onto the screen, so when the video is the only thing that was
updating, the new behavior is equivalent. But the new behavior makes more sense
if you have a 30fps video and a 60fps animation running on a 60fps screen at the
same time - now the bias won't be accidentally reset every other frame.

Differential Revision: https://phabricator.services.mozilla.com/D83459
2020-07-16 03:37:02 +00:00
Markus Stange 3afdfd4289 Bug 1578042 - Update mLastFrameID in a new method UpdateCompositedFrame. r=jya,nical
Differential Revision: https://phabricator.services.mozilla.com/D82634
2020-07-16 03:37:01 +00:00
Kartikaya Gupta 5607802ed1 Bug 1516056 - Follow-up to remove dangling reference to a fixed bug. r=botond
DONTBUILD because comment-only change.

Differential Revision: https://phabricator.services.mozilla.com/D83795
2020-07-16 16:16:12 +00:00
Kartikaya Gupta f9517661e2 Bug 1650438 - Don't expand the dirty rect for fixed items during a partial update. r=mstange,botond
When doing a display list build, there's some code that expands the dirty
and visible rects for out-of-flow items to include the entire visual viewport
or displayport, because out-of-flow items are specially positioned in the
compositor and may become visible without the main thread knowing about it.

However, this happens even during partial updates using retained display lists,
which I believe is undesirable because the preceding non-partial update should
already have painted all the right things. The partial update should be
restricted to the part of the OOF item that actually need repainting, and the
merging of the partial update into the full display list should produce a final
display list that covers everything.

Differential Revision: https://phabricator.services.mozilla.com/D82216
2020-07-16 15:59:03 +00:00
Nicolas Silva e503589521 Bug 1645223 - Disable WebRender if XRender is enabled. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D83655
2020-07-16 12:08:22 +00:00
Nicolas Silva 35d380ffc3 Bug 1650990 - Use Euclid 0.20.14. r=kvark
It contains a fix for some of the rect operations interacting poorly with NaNs.

Differential Revision: https://phabricator.services.mozilla.com/D83774
2020-07-16 13:24:19 +00:00
Kartikaya Gupta 7c3500625f Bug 1652986 - Restore ability to dump the WR display list interleaved with the the gecko DL. r=miko
The extra_data_offset wasn't being set properly in the built display list's
descriptor, so no items were being found. With that fixed it became evident
that we need to disable the display list item cache for dumping to work, since
we can't easily look up reuse items when doing the interleaved dumping. So
this patch also adds some machinery for that.

Differential Revision: https://phabricator.services.mozilla.com/D83778
2020-07-16 14:19:41 +00:00
Nicolas Silva eb34985ecc Bug 1625070 - Use glxCopySubBufferMESA when available if partial present and WebRender are enabled on GLX. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D81868
2020-07-16 14:44:41 +00:00
Butkovits Atila e5880f1a26 Backed out changeset 697243e0434b (bug 1640960) as requested by kvark. CLOSED TREE 2020-07-16 17:31:20 +03:00
Dzmitry Malyshau 56fab6aa82 Bug 1647918 - Don't unwrap space mapping in add_prim_to_batch for text in WR r=gw,jnicol
this is a crash I'm seeing on "testcase.html" attachment,
which is different from the originally reported one.

Differential Revision: https://phabricator.services.mozilla.com/D83689
2020-07-16 13:31:27 +00:00
Narcis Beleuzu 2f4cbd537c Backed out changeset 74a508f9bac4 (bug 1625070) for wr failure on position-sticky-scroll-reposition.html . CLOSED TREE 2020-07-16 13:03:13 +03:00
Nicolas Silva 8f37bf747b Bug 1625070 - Use glxCopySubBufferMESA when available if partial present and WebRender are enabled on GLX. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D81868
2020-07-15 18:20:48 +00:00
Ting-Yu Lin 4254bae54a Bug 1652207 - Make IntCoordTyped and CoordTyped derive from units. r=botond
The GCC versions we needed to work around are no longer supported. Our
current minimum requirement for GCC is 7.1 per
https://groups.google.com/forum/#!msg/mozilla.dev.platform/ygj-1MDVB4M/CLxE_7OcBAAJ

Differential Revision: https://phabricator.services.mozilla.com/D83232
2020-07-15 21:53:26 +00:00
Kartikaya Gupta 2c7f65ff19 Bug 1646891 - Ensure the pinch gesture inputs dispatched to gecko have a refpoint set. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D83376
2020-07-15 22:41:10 +00:00
Jonathan Kew 8239026d15 Bug 1648085 - Create family entries for any localized font-family names exposed by fontconfig. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D83569
2020-07-15 18:38:51 +00:00
Bert Peers 16439a0ec2 Bug 1647946 - SWGL Mac Correctness issues r=lsalzman,mstange
1/ the texture binding expects the pixel pointer to start at the top
left of the valid rectangle, not the top left of the entire mapped
layer;

2/ pending clears must be resolved before compositing the texture;

Differential Revision: https://phabricator.services.mozilla.com/D83587
2020-07-15 17:17:07 +00:00
Simon Giesecke 7701ae7587 Bug 1652003 - Remove unnecessary includes from gfxFont.h. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D83100
2020-07-15 12:47:28 +00:00
Simon Giesecke ff82bb1529 Bug 1651736 - Remove unnecessary includes from LayersMessageUtils.h. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D83099
2020-07-15 12:47:00 +00:00
Simon Giesecke 0525ba37d2 Bug 1651736 - Reduce expensive includes for LayersMessageUtils.h. r=botond
This reduces the number of includes of LayersMessageUtils.h from 270 to 199
on Linux.

Differential Revision: https://phabricator.services.mozilla.com/D82941
2020-07-15 13:21:23 +00:00
Simon Giesecke fea9dab7f2 Bug 1651714 - Reduce expensive includes for TabMessageUtils.h. r=smaug
With these changes, on my Linux analysis with ClangBuildAnalyzer, the
top two expensive headers, DOMTypes.h and TabMessageUtils.h are no longer
among the 30 most expensive headers.

Differential Revision: https://phabricator.services.mozilla.com/D82935
2020-07-15 13:24:20 +00:00