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

37842 Коммитов

Автор SHA1 Сообщение Дата
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
Jamie Nicol c18dcab954 Bug 1609191 - Ensure shader sources are always unique to workaround adreno crash. r=gw
On some Adreno 505 and 506 devices we are encountering driver crashes during
glLinkProgram(). The only circumstance in which we have been able to reproduce
locally is when the show-overdraw debug option is enabled. The reason appears to
be that, due to shader optimisation, the debug overdraw variants of many shaders
have identical source code. The crash seems to occur when linking a shader which
has identical source code to a previously linked shader.

This does not, however, explain the non-insignificant numbers of crashes in the
wild because a) it's unlikely many users are enabling overdraw debugging, and b)
some crash reports predate the commit which enabled shader
optimisation. However, it is possible that for a different reason we are
compiling multiple shaders with identical source code.

To attempt to work around this crash this change adds a random comment to the
end of each shader source string, on the affected devices.

Differential Revision: https://phabricator.services.mozilla.com/D83571
2020-07-15 15:39:47 +00:00
Dzmitry Malyshau 368c201e04 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-15 15:27:32 +00:00
Coroiu Cristina a96ed5ec72 Backed changeset bbe5ed51273b (Bug 1609191) for webrender failures. CLOSED TREE 2020-07-15 17:55:12 +03:00
Jamie Nicol 3141d488db Bug 1609191 - Ensure shader sources are always unique to workaround adreno crash. r=gw
On some Adreno 505 and 506 devices we are encountering driver crashes during
glLinkProgram(). The only circumstance in which we have been able to reproduce
locally is when the show-overdraw debug option is enabled. The reason appears to
be that, due to shader optimisation, the debug overdraw variants of many shaders
have identical source code. The crash seems to occur when linking a shader which
has identical source code to a previously linked shader.

This does not, however, explain the non-insignificant numbers of crashes in the
wild because a) it's unlikely many users are enabling overdraw debugging, and b)
some crash reports predate the commit which enabled shader
optimisation. However, it is possible that for a different reason we are
compiling multiple shaders with identical source code.

To attempt to work around this crash this change adds a random comment to the
end of each shader source string, on the affected devices.

Differential Revision: https://phabricator.services.mozilla.com/D83571
2020-07-15 14:29:35 +00:00
Kartikaya Gupta 5f51548e24 Bug 1650799 - Add a mochitest to cover some of the displayport calculation code. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D82776
2020-07-15 07:57:28 +00:00
Glenn Watson eb66d3db0f Bug 1651797 - Fix invalidation of segments when picture rect changes. r=nical
This is a workaround, rather than an ideal fix. The patch contains
a comment describing why it's required and what the proper fix is.

Differential Revision: https://phabricator.services.mozilla.com/D83590
2020-07-15 07:54:56 +00:00
Csoregi Natalia e2a46cc211 Bug 1650984 - Fix trailing space. r=fix CLOSED TREE 2020-07-15 05:34:31 +03:00
Lee Salzman aa690536d8 Bug 1650984 - add SWGL LockedResource API. r=jimb,jrmuizel
SwCompositor needs to send SWGL textures references safely to the SwComposite
thread. However, the SWGL context's texture store may grow and make accessing
these tables unsafe. To work around this, this patch adds a LockedResource
API that locks down access to these textures ahead of time both to ensure that
no table access is necessary and to help detect any unexpected modifications
of these textures while they are locked. These LockedResource objects can then
be composited safely in another thread without interfering with normal SWGL
operation in the original that that isn't simultaneously using these textures.

Differential Revision: https://phabricator.services.mozilla.com/D82666
2020-07-14 20:49:26 +00:00
Lee Salzman d5441a4318 Bug 1650984 - make SwCompositor composite asynchronously in another thread. r=jrmuizel
This spawns a new SwComposite thread inside SwCompositor. Tile composite jobs
are submitted over a channel to the thread, with a condition being signaled
after all jobs are processed. The SwCompositor computes a dependency order for
the tiles based on whether it overlaps a tile that has been invalidated and
needs to be updated during the current frame. As tiles are gradually updated,
all tiles that would depend on the update as denoted by the dependency order get
submitted so that composition can proceed. Ultimately, this allows tile updates
and compositing to work in parallel, pipelining much of the cost of compositing.

Differential Revision: https://phabricator.services.mozilla.com/D82474
2020-07-14 20:49:13 +00:00
Lee Salzman 2ce421308a Bug 1650984 - add invalidate_tile to WR Compositor interface. r=gw
This restructures the WR Compositor interface a bit to support compositing
earlier in the frame. An invalidate_tile hook is added that gets called
first to signal that some picture cache tiles will be modified later in the
frame. The renderer then calls add_surface earlier before the picture cache
tiles are updated, so that any tiles that aren't invalid can proceed to
composite early before that. Finally, bind/unbind get called after so that
it can work potentially work in parallel with any tiles that are already
compositing early.

Differential Revision: https://phabricator.services.mozilla.com/D82473
2020-07-14 20:49:01 +00:00
Markus Stange 88f1fdde7b Bug 1652825 - Add BaseTransactionId::operator!=. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D83547
2020-07-14 18:13:12 +00:00
Bert Peers 31beff2880 Bug 1652601 - Fix SWGL Mac assertion r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D83420
2020-07-14 06:08:57 +00:00
Jonathan Kew 01241894f0 Bug 1648353 - Remove/downgrade MOZ_DIAGNOSTIC_ASSERTs that may unnecessarily crash the parent process, but provide no useful data. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D82511
2020-07-14 15:41:01 +00:00
Dzmitry Malyshau 6bf2ab7478 Bug 1640960 - Always sort WR shader features r=jnicol,gw
I found it hard to understand the code that builds shader features,
and even harder to modify it with a new feature. This PR refactors the shader
building code by removing the macro and introducing a FeatureList abstraction, internally.
It also sorts the features on both ends (alternatively, we could use a set).

Differential Revision: https://phabricator.services.mozilla.com/D83455
2020-07-14 15:53:31 +00:00
Andreea Pavel 3434479f8e Backed out changeset ca1168e024b9 (bug 1640960) for causing bug 1541711 on a CLOSED TREE 2020-07-14 17:58:13 +03:00
Miko Mynttinen 5c6954fa0d Bug 1652550 - Disable RenderExternalTextureHost when BufferTextureHost is wrapped with GPUVideoTextureHost r=mattwoodrow
This patch also re-enables client storage for Nightly builds (gfx.webrender.enable-client-storage=true).

Differential Revision: https://phabricator.services.mozilla.com/D83375
2020-07-14 13:31:32 +00:00
Sylvestre Ledru 1dbb63db2b Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D83258
2020-07-14 09:34:19 +00:00
Hiroyuki Ikezoe 16690e4669 Bug 1651910 - Use only AnimationTransform::mFrameTransform for WebRender. r=kats
With the previous change, on WebRender AnimationTransform::mTransformInDevSpace
and AnimationTransform::mFrameTransform are pretty much same, so we don't need
to set both of values, we need only mFrameTransform.

Also this patch drops move(s), I didn't know that Matrix4x4 can't be moved.

Differential Revision: https://phabricator.services.mozilla.com/D83041
2020-07-14 02:31:11 +00:00
Hiroyuki Ikezoe 8f5df336fa Bug 1651910 - Drop inherited scale values and hasPerspectiveParent in TransformData. r=kats
They haven't been used effectively since bug 1403915.

Differential Revision: https://phabricator.services.mozilla.com/D83040
2020-07-14 02:28:36 +00:00
Hiroyuki Ikezoe a7a193a715 Bug 1651910 - Fix non unified build errors in OMTASampler. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D83039
2020-07-14 02:28:26 +00:00
Hiroyuki Ikezoe 4b34ca45f7 Bug 1651910 - Fix a silly typo for the forward declaration Layer. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D83038
2020-07-14 02:28:24 +00:00
Bert Peers 67b2334ae8 Bug 1652597 - SWGL crash on Mac r=mstange
Allocate extra 16 bytes to support past-the-end reads of SWGL.

Differential Revision: https://phabricator.services.mozilla.com/D83389
2020-07-13 22:43:35 +00:00
Glenn Watson 90e7de7e0f Bug 1652376 - Reduce size of interning handles. r=Bert
This reduces the size of intern handles, which drops the size of
the PrimitiveInstance structure from 80 bytes to 64 bytes. This
has a significant performance improvement on pages with large
numbers of primitives.

It also opens up some future optimization work related to text
run interning costs, which will be a performance win on many pages.

Differential Revision: https://phabricator.services.mozilla.com/D83281
2020-07-13 20:42:25 +00:00
Butkovits Atila f7c37a8a25 Backed out changeset 7fbefca418f3 (bug 1652376) for causing failure at test_file_delete.html. 2020-07-14 01:33:52 +03:00
Dzmitry Malyshau 4c8086aea4 Bug 1640960 - Remove aPosition from all shaders, except debug ones r=gw
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.

Differential Revision: https://phabricator.services.mozilla.com/D83391
2020-07-13 21:29:16 +00:00
Glenn Watson a2f65d6fea Bug 1652376 - Reduce size of interning handles. r=Bert
This reduces the size of intern handles, which drops the size of
the PrimitiveInstance structure from 80 bytes to 64 bytes. This
has a significant performance improvement on pages with large
numbers of primitives.

It also opens up some future optimization work related to text
run interning costs, which will be a performance win on many pages.

Differential Revision: https://phabricator.services.mozilla.com/D83281
2020-07-13 20:42:25 +00:00
tkhan 75ea54bf01 Bug 1650919 - Adding manifest annotations for xorigin test harness. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82763
2020-07-13 20:34:46 +00:00
Bogdan Tara 6faddf7d8f Backed out changeset 1a0f002865d3 (bug 1650919) for test_deprecated.html failures CLOSED TREE 2020-07-13 19:22:21 +03:00
tkhan e50031dfc7 Bug 1650919 - Adding manifest annotations for xorigin test harness. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D82763
2020-07-13 13:01:43 +00:00
Liang-Heng Chen 674a374da9 Bug 1652406 - add private flag back and remove the assertion; r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D83297
2020-07-13 11:06:31 +00:00
Sylvestre Ledru f7a0736a34 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D83259
2020-07-12 17:01:13 +00:00
Botond Ballo de42c3f586 Bug 1637776 - Fix trailing whitespace in test r=rmaries
Differential Revision: https://phabricator.services.mozilla.com/D83252
2020-07-11 22:15:27 +00:00
Botond Ballo 007176902e Bug 1637776 - Add a mochitest for bug 1637113. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D83019
2020-07-11 07:15:33 +00:00
Botond Ballo 38cbb07429 Bug 1637776 - Fix coordinatesRelativeToScreen() to work better for targets inside an iframe. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D83018
2020-07-11 06:32:45 +00:00
longsonr 875f5e88ac Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.

Differential Revision: https://phabricator.services.mozilla.com/D83140
2020-07-11 02:20:20 +00:00
Jeff Muizelaar 0729560a01 Bug 1652181 - Only call UpdateBias when the frame changes. r=sotaro
Previously we were calling it at 60fps for 30fps video. This meant that
any bias would be cancelled out on the vsyncs where we didn't present
anything. This also makes us match the non-WebRender path which only
calls UpdateBias after a frame has actually been drawn.

Differential Revision: https://phabricator.services.mozilla.com/D83211
2020-07-11 00:17:31 +00:00
Jeff Muizelaar d2f53ff680 Bug 1651889. Update to gleam 0.12.1. r=kvark
This should fix a crash caused by an unexpected pixel type.

Differential Revision: https://phabricator.services.mozilla.com/D83167
2020-07-11 02:21:13 +00:00
Jean-Yves Avenard 0a6e148b09 Bug 1650728 - Don't synchronously dispatch a task to create a TextureClientRecycleAllocator. r=sotaro
Additionally, we make access to mTextureClientRecycler, mHandle and mIsAsync thread-safe as they are accessed and set from different threads

Differential Revision: https://phabricator.services.mozilla.com/D82339
2020-07-11 01:57:06 +00:00
Kartikaya Gupta 7cdb8134fb Bug 1650989 - Abort mask creation instead of crashing when the size is too large. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D82809
2020-07-11 00:04:43 +00:00
sotaro e204892c8c Bug 1649122 - Add basic AHardwareBuffer support to WebRender on android r=jrmuizel
android fence is not supported yet.

Differential Revision: https://phabricator.services.mozilla.com/D82317
2020-07-10 18:50:56 +00:00
Daosheng Mu 9bc29112b7 Bug 1650714 - Part 4: Adjust OpenVR and OculusVR rotate transform. r=kip
Depends on D83008

Differential Revision: https://phabricator.services.mozilla.com/D83174
2020-07-10 21:52:57 +00:00
Daosheng Mu 5d6d5bb5f5 Bug 1650714 - Part 3: Add Matrix rotate transform unit tests. r=kip,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D83008
2020-07-10 22:01:11 +00:00
Imanol Fernandez a0b122309a Bug 1650714 - Part 2: Correct XRRigidTransform inverse math r=daoshengmu,kip,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D82433
2020-07-10 22:01:11 +00:00
Daosheng Mu 088f996216 Bug 1650714 - Part 1: Correct Matrix Decompose and SetRotationFromQuaternion. r=kip,imanol,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D82391
2020-07-10 22:01:11 +00:00
Cosmin Sabou 8cf86d8b74 Backed out changeset 1a8c020ebbda (bug 1651889) for gleam related bustages. 2020-07-11 00:50:06 +03:00
Jeff Muizelaar 9f9ac49bd8 Bug 1651889. Update to gleam 0.12.1. r=kvark
This should fix a crash caused by an unexpected pixel type.

Differential Revision: https://phabricator.services.mozilla.com/D83167
2020-07-10 20:52:49 +00:00
Jamie Nicol c43de05c4b Bug 1645665 - Calculate tight bounds for each sub-run of glyphs when batching. r=lsalzman
When adding a text run to a batch, we split the text run in to contiguous
runs of glyphs which can be batched together. For example, when a glyph is
encountered mid-run with a different glyph format or that is cached in a
different texture, then it must be batched separately than the preceeding
glyphs.

However, even though we are only batching sub-runs of glyphs together, we use
the entire text run's bounding rect as the bounds we pass to
`set_params_and_get_batch()`. This means that each sub-run of glyphs that are
batched together will be forced to create an entirely new batch rather than
reuse an existing one (because their bounds will definitely overlap.)

This can have catastrophic consequences on performance. When the texture cache
is full enough that we have allocated a second or greater texture array, then we
risk having text runs with glyphs fragmented over different textures. This can
easily lead to thousands of draw calls on simple but text-heavy pages.

The solution is to calculate the bounds of just the sub-run of glyphs that are
being batched together, and use that instead of the text run's bounds.

Differential Revision: https://phabricator.services.mozilla.com/D83070
2020-07-10 18:41:49 +00:00
Liang-Heng Chen e03242ddb4 Bug 1647732 - isolate font cache; r=baku,jfkthame,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D82034
2020-07-10 10:28:40 +00:00
Tom Prince 204d796929 Bug 1651731: [lint] Python and shell files without `#!` should not be executable; r=linter-reviewers,perftest-reviewers,geckoview-reviewers,agi,sylvestre,sparky
Differential Revision: https://phabricator.services.mozilla.com/D82954
2020-07-09 20:29:18 +00:00
Tom Prince 2c52622b85 Bug 1651731: [lint] Add a bunch more types of files that should never be executable; r=linter-reviewers,perftest-reviewers,geckoview-reviewers,preferences-reviewers,agi,sylvestre,sparky
Differential Revision: https://phabricator.services.mozilla.com/D82953
2020-07-09 21:28:49 +00:00
Imanol Fernandez 3956a11433 Bug 1642994 - Fix SurfaceTexture assertion failure in WebGLContext::GetFrontBuffer r=jgilbert
- WaitForBufferOwnership() must be called before locking the front buffer
- Use mDefaultFB->mFB instead of 0 to fix a freeze in the readPixels call
- SurfaceTexture.releaseTexImage must be called after each use

Differential Revision: https://phabricator.services.mozilla.com/D82944
2020-07-09 18:31:12 +00:00
Kartikaya Gupta 0cf65adf2b Bug 1651050 - Add a logging module for code that sets displayports. r=tnikkel
This is useful for debugging purposes.

Depends on D82778

Differential Revision: https://phabricator.services.mozilla.com/D82779
2020-07-09 10:10:28 +00:00
Hiroyuki Ikezoe 2e4ceac41e Bug 1525561 - Rename nsPresContext::GetToplevelContentDocumentPresContext to GetInProcessRootContentDocumentPresContext. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D82812
2020-07-09 01:58:59 +00:00
Kartikaya Gupta f57e6b6d99 Bug 1651027 - Mitigate race condition caused by updating mExpectedGeckoMetrics on the repaint thread. r=botond
When we request a content repaint from the controller thread, we might then
subsequently compute an apzc-to-gecko transform that expects the
mExpectedGeckoMetrics quantity to have been updated to reflect the content
repaint. However, if the content repaint got bounced to the repaint thread, that
may not have happened, if the repaint thread hasn't run yet. This is a data
race that can cause glitching in the apzc-to-gecko transform computation. This
patch addresses it by also synchronously updating the mExpectedGeckoMetrics
synchronously before bouncing to the repaint thread. The repaint thread will
re-update the mExpectedGeckoMetrics which should generally be a no-op, unless
other updates snuck in between, in which case we *do* want to do that re-update.

Differential Revision: https://phabricator.services.mozilla.com/D82762
2020-07-09 00:17:28 +00:00
Kartikaya Gupta 14a32ed41c Bug 1651027 - Create a new trimmed-down class to store the expected gecko metrics. r=botond
We only use three fields from this so keeping a whole FrameMetrics around seems
heavyweight. We could even reduce it two fields by combining the zoom with the
devPixelsPerCSSPixel ratio but it seems a bit cleaner and more consistent to
do the division at the use site.

Differential Revision: https://phabricator.services.mozilla.com/D82761
2020-07-08 22:16:09 +00:00
Markus Stange 3d57edb614 Bug 1649313 - Add SkippedComposite markers. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D82636
2020-07-08 18:41:21 +00:00
Jean-Yves Avenard 5bd9f01114 Bug 1650786 - Make ImageBridgeChild use a nsThread. r=KrisWright,mattwoodrow
This is a partial revert of bug 1647628.

The ImageBridgeChild's thread is used to dispatch synchronous tasks by its consumers.
While the background taskqueue is using a single thread threadpool, this would prevent many places to also use a background taskqueue that could end up calling the ImageBridgeChild.

Differential Revision: https://phabricator.services.mozilla.com/D82395
2020-07-08 06:32:19 +00:00
Jeff Muizelaar f2b7a41716 Bug 1650475. Enable GPU switching on Mac. r=kvark
The goal here is to make it so that we don't special case the device on Mac
so that we can switch GPUs without needing to reset any state.

There a couple of parts to this:
1. Disable texture storage so that we can use BGRA textures and don't need swizzling.
2. Use the recommended GL_UNSIGNED_INT_8_8_8_8_REV for BGRA on desktop GL.
3. Disable swizzling.
4. Always do the PBO workaround.

Differential Revision: https://phabricator.services.mozilla.com/D82223
2020-07-08 01:56:55 +00:00
Doug Thayer b274aafa4b Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-08 02:46:34 +00:00
Jeff Muizelaar 4031f2396c Bug 1650801 - Panic instead of failing gracefully if FreeType failed to initialize. r=gw
Bug 1650662 makes us RELEASE_ASSERT on FreeType initialization earlier
so I think it's unlikely that we ever hit this case in the future.

Differential Revision: https://phabricator.services.mozilla.com/D82390
2020-07-07 23:35:48 +00:00
Hiroyuki Ikezoe 098ddfe07f Bug 1650975 - Drop unused `transformOrigin` in LayerTransactionParent::RecvGetTransform. r=boris
The value is used only for WebRender implementation.

Differential Revision: https://phabricator.services.mozilla.com/D82468
2020-07-07 19:43:55 +00:00
Bob Owen 94d0f9a447 Bug 1651116: Check DataSourceSurface is mapped in StoreSourceSurfaceRecording before recording. r=jrmuizel
Depends on D82408

Differential Revision: https://phabricator.services.mozilla.com/D82585
2020-07-07 19:32:38 +00:00
Bob Owen cfb7b6911c Bug 1650829: When the surface is too big to create a dummy in StoreSourceSurfaceRecording just create a 1x1 dummy. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D82408
2020-07-07 19:26:13 +00:00
Narcis Beleuzu a182c015f5 Backed out 6 changesets (bug 1627075) for bustages on startupcache/StartupCache.cpp . CLOSED TREE
Backed out changeset 21605186687e (bug 1627075)
Backed out changeset e29b15980da2 (bug 1627075)
Backed out changeset eb5265addd5e (bug 1627075)
Backed out changeset dfd71f4ecb81 (bug 1627075)
Backed out changeset 13ecd68b3c0d (bug 1627075)
Backed out changeset 333d035afe92 (bug 1627075)
2020-07-07 23:30:48 +03:00
Bob Owen e35330bd95 Bug 1641256: Don't deactivate remote canvas due to read error when the writer has already failed. r=jrmuizel
This also removes the gfxDevCrashes when an invalid enum is read, because we
suspect these are mainly due to the writer shutting down mid event.
We could only crash when the writer hasn't failed, but because these reads are
in templated code it would mean updating the different event streams with a new
function. If we are still getting high numbers in the deactivation telemetry we
will need to do this to try and track down the problem.

Differential Revision: https://phabricator.services.mozilla.com/D82493
2020-07-07 19:30:14 +00:00
Doug Thayer a2595a8402 Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-07 17:04:27 +00:00
Miko Mynttinen 0d02beff03 Bug 1536515 - Part 3: Add RenderExternalTextureHost r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D80506
2020-07-07 17:57:22 +00:00
Miko Mynttinen 26bb4c4d41 Bug 1536515 - Part 2: Add constructors that take GLContext to GLTextureSource and DirectMapTextureSource r=nical
Differential Revision: https://phabricator.services.mozilla.com/D80505
2020-07-07 17:56:59 +00:00
Miko Mynttinen 0969459ef6 Bug 1536515 - Part 1: Use the correct OpenGL formats for SurfaceFormat::A8 and SurfaceFormat::A16 r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D80504
2020-07-07 17:56:46 +00:00
Nicolas Silva a4fc3e389e Bug 1650403 - Skip invisible clusters in the batching pass. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D82194
2020-07-06 08:43:15 +00:00
Nicolas Silva a99ab630fd Bug 1650403 - Skip invisible clusters in the prepare pass. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D82192
2020-07-05 20:41:24 +00:00
Mihai Alexandru Michis 87cb0ad6fa Backed out 6 changesets (bug 1627075) for causing bustages in StartupCache.cpp
CLOSED TREE

Backed out changeset fc144caf5d06 (bug 1627075)
Backed out changeset a345e05df151 (bug 1627075)
Backed out changeset 288a67aed661 (bug 1627075)
Backed out changeset 2cb021a493d8 (bug 1627075)
Backed out changeset 920398d1c3d3 (bug 1627075)
Backed out changeset ebdcd96a9d20 (bug 1627075)
2020-07-07 08:47:14 +03:00
Doug Thayer e3f3b7b80b Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-07 04:36:27 +00:00
Nick Alexander 9d1281ef52 Bug 1641291 - Part 1: Allow cross-compiling from host macOS -> Windows target. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D77117
2020-07-07 02:13:35 +00:00
Kartikaya Gupta bf0c5bbdbe Bug 1650868 - Make the async zoom containment checks subtree-specific. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D82438
2020-07-07 00:24:26 +00:00
Kagami Sascha Rosylight f6d17b63b5 Bug 1630704 - Part 28: Remove nsFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81865
2020-07-06 22:38:11 +00:00
Glenn Watson dbd0071486 Bug 1650706 - Add profiler annotations for scene building. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D82316
2020-07-06 22:29:44 +00:00
Andreea Pavel ddb0d07cd3 Backed out changeset 6555b65ef4cc (bug 1650801) for build bustages on a CLOSED TREE 2020-07-07 00:16:47 +03:00
sotaro 1369377c0a Bug 1650389 - Add gfx::BackendType check to GetTextureType() r=jrmuizel
TextureType::AndroidHardwareBuffer usage needs gfx::BackendType check. gfxVars::UseAHardwareBufferContent() requests BackendSelector::Content.

Differential Revision: https://phabricator.services.mozilla.com/D82191
2020-07-06 14:50:14 +00:00
Jeff Muizelaar ca9bed50d3 Bug 1650801 - Panic instead of failing gracefully if FreeType failed to initialize. r=gw
Bug 1650662 makes us RELEASE_ASSERT on FreeType initialization earlier
so I think it's unlikely that we ever hit this case in the future.

Differential Revision: https://phabricator.services.mozilla.com/D82390
2020-07-06 20:27:38 +00:00
Kartikaya Gupta d3b52921d1 Bug 1650848 - Make the root scroller actually scrollable in the test. r=botond
The body tag has special behaviour and this page doesn't behave as one might
expect if the body tag were a div, for example. The root scroller here is still
the html element, and if the browser window is taller than 1000px it's not
considered scrollable. And on Android, with the initial-scale that gets applied,
the root scroller is actually not scrollable. This patch fixes it to ensure the
root scroller is actually scrollable in testing scenarios.

Differential Revision: https://phabricator.services.mozilla.com/D82411
2020-07-06 17:45:36 +00:00
Imanol Fernandez 41f5efde8f Bug 1374571 - Ensure ANativeWindow is not null before calling eglCreateWindowSurface r=jgilbert
ANativeWindow_fromSurface can return null. This leads to a crash in the eglCreateWindowSurface call.

Differential Revision: https://phabricator.services.mozilla.com/D82369
2020-07-06 17:07:35 +00:00
Jonathan Kew 94f1922418 Bug 1649527 - Initialize character map when creating a gfxFontEntry if it is already available from a shared font-list Face record. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D81822
2020-07-06 14:29:23 +00:00
aardgoose 63856c61b2 Bug 1536674 - Expose KHR_parallel_shader_compile in glx/gl r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D32056
2020-07-06 12:48:47 +00:00
Jonathan Kew 2ac8d8b91b Bug 1633254 - Don't allow dwrite fonts to use GDI table access if the font family is non-simple, as it might access the wrong resource. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D81819
2020-07-06 14:00:58 +00:00
Jonathan Kew 2e5d0e7cd2 Bug 1650414 - Cherry-pick commit 1e6027e29cd5d900337b23a20886b2a8d81bb2de from upstream harfbuzz to fix AAT mark anchoring. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D82318
2020-07-06 09:03:29 +00:00
Nicolas Silva 9220520d09 Bug 1650359 - Move GpuCacheHandle and GpuCacheAddress impls back close to their type definitions. r=gw
Depends on D82181

Differential Revision: https://phabricator.services.mozilla.com/D82182
2020-07-05 20:35:46 +00:00
Nicolas Silva 5b10a47920 Bug 1650359 - Move SpaceMapper and SpaceSnapper into space.rs. r=gw
Depends on D82180

Differential Revision: https://phabricator.services.mozilla.com/D82181
2020-07-05 20:35:08 +00:00
Nicolas Silva d9170843e8 Bug 1650359 - Move get_line_decoration_size into prim_store/line_dec.rs. r=gw
Depends on D82179

Differential Revision: https://phabricator.services.mozilla.com/D82180
2020-07-05 20:34:50 +00:00
Nicolas Silva 275d45b706 Bug 1650359 - Move get_raster_rects to picture.rs. r=gw
It is only used there.

Differential Revision: https://phabricator.services.mozilla.com/D82179
2020-07-05 20:34:32 +00:00
Glenn Watson 9918711081 Bug 1623792 - Pt 6 - Always create picture caching slices. r=nical
Even when picture caching is disabled, we want to create the
wrapping picture elements for these slices, to simplify
some upcoming patches (we can assume that the picture cache
elements are always present).

The dynamic check at the start of FrameBuilder::build ensures
that these are pass-through pictures when picture caching is
disabled.

In future, we'll also take advantage of this to track dirty
regions in the disabled case, to allow partial present to
work in all scenarios.

Differential Revision: https://phabricator.services.mozilla.com/D82134
2020-07-05 20:23:25 +00:00
Glenn Watson a9c83bb752 Bug 1623792 - Pt 5 - Determine no-op filters during scene building. r=nical
Previously, we would defer calculation of whether a filter was a
no-op until frame building. However, this complicates decisions
related to which clips apply to which surfaces.

Now, this decision is made during scene building. This makes things
more consistent during frame building, which we can take advantage
of in future. It also makes things like render target allocations
slightly more predictable.

Differential Revision: https://phabricator.services.mozilla.com/D82133
2020-07-05 20:23:22 +00:00
Jeff Muizelaar 1ccd29d935 Bug 1650662 - RELEASE_ASSERT that FT_Init_FreeType succeeds. r=lsalzman
I don't think we should bother trying to run without a working FreeType.

Differential Revision: https://phabricator.services.mozilla.com/D82298
2020-07-05 19:40:37 +00:00
Hiroyuki Ikezoe 4205879729 Bug 1324591 - Report janked animations to the main-thread and update them on the main-thread. r=botond,boris
The machinery to report janked animations is;

1) Store the partial pre-rendered animation id and the Animation object in a
   hashtable in LayerManager
2) Store the animation id in the Animation object as well
3) When we detect jank, we send the animation id to the main-thread via an IPC
   call
4) Find the Animation object with the id in the hashtable and update the
   Animaiton
5) Whenever the partial pre-rendered Animation stop running on the compositor
   i.e. the Animation finished normally, the Animation's target element is
   changed, etc. etc., remove the Animation from the hashtable

Depends on D75731

Differential Revision: https://phabricator.services.mozilla.com/D75732
2020-07-05 11:45:01 +00:00
Hiroyuki Ikezoe 85030f4af6 Bug 1324591 - Jank if we are trying to composite area which is outside of the the partial prerender rect on non WebRender. r=botond,jrmuizel
Depends on D81481

Differential Revision: https://phabricator.services.mozilla.com/D75731
2020-07-05 11:44:18 +00:00
Hiroyuki Ikezoe 80fc56a28e Bug 1324591 - Add APZSampler::GetCompositionBounds to get the composition bounds for a given pair of LayersId and scrollId. r=botond
Depends on D75730

Differential Revision: https://phabricator.services.mozilla.com/D81481
2020-07-05 11:43:45 +00:00
Hiroyuki Ikezoe ec49c6a9a8 Bug 1324591 - Inform the partial prerender rect, the overflowed SideBits, the scroll id of the nearest scrollable frame and its rectable to the compositor. r=botond
nsDisplayTransform doesn't have enough room to store the partial prerender rect
and the overflowed SideBits unfortunately (it will exceed 512 bytes limit [1]).
So we get the partial prerender rect and calculate the overflowed SideBits just
before we send transform animation information to the compositor.

[1] https://searchfox.org/mozilla-central/rev/fa52bedc4b401c12251513fa1c9df1753a29abb2/layout/painting/nsDisplayList.cpp#7318

Depends on D81480

Differential Revision: https://phabricator.services.mozilla.com/D75730
2020-07-05 11:43:33 +00:00
Hiroyuki Ikezoe 1c1e6e4963 Bug 1324591 - Store the corresponding LayersId for each animation on the compositor. r=kats
Depends on D75727

Differential Revision: https://phabricator.services.mozilla.com/D75728
2020-07-05 11:42:55 +00:00
Brindusan Cristian 7f75410fd7 Backed out 9 changesets (bug 1324591) for linux build bustages on central on nsDisplayList.h.
Backed out changeset 75966ee1fe65 (bug 1324591)
Backed out changeset d6a01c6bc40e (bug 1324591)
Backed out changeset fef36ff2ea3d (bug 1324591)
Backed out changeset 4a4ae4bd95d1 (bug 1324591)
Backed out changeset 732804c83add (bug 1324591)
Backed out changeset 84657a3522fb (bug 1324591)
Backed out changeset e6c74ba41007 (bug 1324591)
Backed out changeset 8e6d4e9f5aa0 (bug 1324591)
Backed out changeset 6bc284863aff (bug 1324591)
2020-07-05 13:45:35 +03:00
Hiroyuki Ikezoe 92208a9c28 Bug 1324591 - Report janked animations to the main-thread and update them on the main-thread. r=botond,boris
The machinery to report janked animations is;

1) Store the partial pre-rendered animation id and the Animation object in a
   hashtable in LayerManager
2) Store the animation id in the Animation object as well
3) When we detect jank, we send the animation id to the main-thread via an IPC
   call
4) Find the Animation object with the id in the hashtable and update the
   Animaiton
5) Whenever the partial pre-rendered Animation stop running on the compositor
   i.e. the Animation finished normally, the Animation's target element is
   changed, etc. etc., remove the Animation from the hashtable

Differential Revision: https://phabricator.services.mozilla.com/D75732
2020-07-05 02:21:01 +00:00