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

37296 Коммитов

Автор SHA1 Сообщение Дата
Nicolas Silva af826aab13 Bug 1642629 - Avoid iterating over all batch item rects in some cases. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D79480
2020-06-15 13:28:13 +00:00
Nicolas Silva dbf71f4793 Bug 1642629 - preallocate a few vectors in CompositeState. r=gw
These vectors are rebuilt once per frame. we can't recycle them because they are sent to the renderer. On a 4k screen for most sites the element counts are low enough that we can get away with preallocation from a pessimistic estimate, but high enough that reallocation happens a few times per frame and takes a small but visible portion of the profile.

Differential Revision: https://phabricator.services.mozilla.com/D79457
2020-06-15 13:28:13 +00:00
sotaro ff041549ae Bug 1640901 - Update CompositorBridgeID when ImageHost is async in ImageLayerComposite::SetLayerManager() r=mattwoodrow
When Tab is moved to another window, all async ImageHosts need to update CompositorBridgeID. It is used for calling ScheduleComposition().

Differential Revision: https://phabricator.services.mozilla.com/D79068
2020-06-14 07:29:20 +00:00
Jonathan Kew 52874b4df6 Bug 1645587 - Add missing null-check for family in FontList::SetLocalNames, in case font families are blocked by the font whitelist or visibility prefs. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D79595
2020-06-14 13:08:21 +00:00
Martin Stransky 48eab6d50c Bug 1629788 [Wayland] Add widget.wayland-dmabuf-video-textures.enabled preference, r=jhorak
- widget.wayland-dmabuf-video-textures.enabled controls dmabuf texture backend for decoded video frames.

Differential Revision: https://phabricator.services.mozilla.com/D78293
2020-06-13 18:38:45 +00:00
Jean-Yves Avenard 9b85722f24 Bug 1644254 - Keep a reference to the CompositorThreadHolder until gfx shutdown tasks have run. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D79596
2020-06-13 12:30:27 +00:00
Bogdan Tara f3d007c8fd Backed out 3 changesets (bug 1629788) for WaylandDMABufSurface.cpp related bustages CLOSED TREE
Backed out changeset 31fba4d1fe1d (bug 1629788)
Backed out changeset 9d1e4da287a6 (bug 1629788)
Backed out changeset 23791ccf64dd (bug 1629788)
2020-06-13 13:56:04 +03:00
Martin Stransky ef2c5466dd Bug 1629788 [Wayland] Add widget.wayland-dmabuf-video-textures.enabled preference, r=jhorak
- widget.wayland-dmabuf-video-textures.enabled controls dmabuf texture backend for decoded video frames.

Differential Revision: https://phabricator.services.mozilla.com/D78293
2020-06-13 10:35:32 +00:00
Jonathan Kew 5de135d535 Bug 1645524 - Correctly set the return value of gfxDWriteFontList::ReadFaceNames to support src:local(...) face search. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D79564
2020-06-13 03:11:23 +00:00
Dzmitry Malyshau 1df0745ce1 Bug 1642495 - Use the same usage hint in WebRender for one-time reset r=gw
This should let the GL drivers to re-use the PBOs more aggressively,
and traverse the orphan list less.
Fwiw, it doesn't look like Angle differentiates between StreamDraw and DynamicDraw:
https://searchfox.org/mozilla-central/rev/598e50d2c3cd81cd616654f16af811adceb08f9f/gfx/angle/checkout/src/libANGLE/renderer/d3d/BufferD3D.cpp#65-66

Differential Revision: https://phabricator.services.mozilla.com/D78339
2020-06-13 01:38:10 +00:00
Jonathan Kew 4a4f4331c2 Bug 1645482 - Don't leak dwrite font table references after reading font names. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D79534
2020-06-12 19:50:07 +00:00
Kartikaya Gupta 8004743db4 Bug 1643884 - Don't run APZCCallbackHelper::NotifyPinchGesture synchronously to avoid re-entrancy in InputQueue::ProcessQueue. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D79459
2020-06-12 16:45:28 +00:00
Dzmitry Malyshau 8a480da876 Bug 1642495 - Limit WebRender instance buffer sizes r=gw
This is an attempt to improve our relationship with the drivers.
Currently, we work with the instance buffer limit dictated by the macOS drivers.
We can consider lowering it, since it will only make the driver work eaiser.

Differential Revision: https://phabricator.services.mozilla.com/D78164
2020-06-12 16:46:51 +00:00
Jonathan Kew 556989ec22 Bug 1644285 - Use descriptor rather than index (which might change) to record font face in local-names InitData record on Linux. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D79192
2020-06-12 12:07:05 +00:00
Andrew Osmond 8f69882854 Bug 1628657 - Make canvas use computed reference frame transforms. r=kvark
When a transform depends on the layout size of an element, one can see
visual distortions caused by the difference between the unsnapped size
used in the transform, and the snapped size calculated during scene
building. Ideally we could compute the transform after we snap, rather
than before. This patch adds support for a computed reference frame
which takes parameters to calculate the ideal transform dynamically.

In a future patch, we should make videos take advantage of this same
mechanism to avoid similar problems. This requires support for mirroring
and rotations.

Differential Revision: https://phabricator.services.mozilla.com/D77956
2020-06-11 20:46:05 +00:00
Andrew Osmond 65ad608400 Bug 1641594 - Remove the wrapper around recycled surfaces. r=tnikkel
We can perform the same function as RecyclingSourceSurface by checking
the ref count of the underlying surface directly. We need to ensure
WebRender is explicitly aware that it is a recycled surface, but that is
easily achieved by changing the type of the surface. This avoids
unnecessary heap allocations, particularly in the case where many
elements on the same page refer to the same animation (and thus
duplicating RecyclingSourceSurface objects).

Differential Revision: https://phabricator.services.mozilla.com/D77513
2020-06-11 17:49:13 +00:00
Nicolas Silva 6f344901e5 Bug 1642629 - Reduce the amount of vector reallocation when adding primitives to batches. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D79277
2020-06-12 08:44:58 +00:00
Glenn Watson 649907c2a1 Bug 1623792 - Remove unused `add_prim_to_start` code path. r=nical
Remove associated enum and code path that are no longer used since
the removal of Push/PopClipChain display items.

Differential Revision: https://phabricator.services.mozilla.com/D79406
2020-06-12 08:21:13 +00:00
Nicolas Silva c10ab4920c Bug 1645124 - Bump the number of layers per alpha texture array from 4 to 8. r=gw
This prevent frequent batch breaks with non-sub-px-aa text runs.

Differential Revision: https://phabricator.services.mozilla.com/D79327
2020-06-11 20:16:24 +00:00
Jean-Yves Avenard 71373f3f10 Bug 1644009 - P7. Revert "Bug 1592488 - P4. Ensure an AbstractThread exists for the Compositor Thread." r=mattwoodrow
DirectTask dispatching will now be directly handled by nsThread.

Differential Revision: https://phabricator.services.mozilla.com/D79091
2020-06-12 05:10:10 +00:00
Kartikaya Gupta ba088f5b71 Bug 1644271 - Add a ManagerType field to the MVM, to allow conditional behaviour. r=tnikkel
The MVM is needed for both handling of meta-viewport tags and APZ zooming.
However, the set of functionality needed in the two modes are not the same.
This patch adds a mechanism to create an MVM with a flag that lets it know
which mode it is operating in. Eventually we may want to split this into two
or more classes but for now this seems like a reasonable way forward.

The flag is currently set on the MVM on creation based on whether or not the
meta-viewport support is needed. There's no code that meaningfully *uses* the
flag yet, so this patch should have no functional change. The bulk of the
patch is ensuring that we appropriately destroy and re-create the MVM if the
flag required changes.

Differential Revision: https://phabricator.services.mozilla.com/D79224
2020-06-12 01:15:42 +00:00
Razvan Maries 4326a2fab5 Backed out changeset 88406054eb6c (bug 1636645) for perma failures on 456219-1a.html. CLOSED TREE 2020-06-12 02:11:46 +03:00
Kearwood Gilbert 8584903f39 Bug 1644579 - Allow VR backends to be enabled and disabled without restarting. Ensure that all other backends are disabled when the VR puppet is enabled. r=daoshengmu
Differential Revision: https://phabricator.services.mozilla.com/D78993
2020-06-10 19:04:19 +00:00
Dzmitry Malyshau c91ee11436 Bug 1636645 - Batch instance and rects consolidation r=gw
The main idea here is lifting the storages of batches, instances, and instance rects,higher up. Currently, to the level of the alpha/opaque batcher.
In the short term, this would result in less heap allocations on frame building.
For example, we no longer have a Vec<InstanceRect> per batch, stored in a separate Vec,
and we don't have a separate Vec<InstanceData> per batch.
There is also a matter of code refactor and cleanup that could make our life better.

In the longer term, once Angle is updated, we'll be able to lift the VBO updates up
accordingly, and use baseInstance drawing with them.

Sub-commits:
- Minor refactor of the batch intersection logic
- Instance stacks for transparent alpha batches
- Use instance stacks for opaque batches as well
- Implement and re-enable batch list merging
- Encapsulate instance stack LRU indexing into a class
- Internal BatchList type, bumped StackIndex size.
- Adjust the tests
- Test the stack count of 4

Differential Revision: https://phabricator.services.mozilla.com/D76715
2020-06-10 22:42:28 +00:00
Botond Ballo f91b39185b Bug 1643604 - Move the check for a resized layout viewport in NotifylayersUpdated to the non-first-paint case. r=kats
In the first-paint case, we are accepting the incoming scroll metadata
wholesale, so most of the consequences of this code block will happen
anyways -- except for the extra repaint, which is not actually needed
and in fact undesirable in the first-paint case.

Differential Revision: https://phabricator.services.mozilla.com/D79195
2020-06-11 21:05:09 +00:00
Dorel Luca 255f146f14 Backed out 7 changesets (bug 1632249) for Gtest perma chrash in [@ mozilla::BlockingResourceBase::CheckAcquire()]. CLOSED TREE
Backed out changeset 4ff99aab3ee8 (bug 1632249)
Backed out changeset d5b7fe789001 (bug 1632249)
Backed out changeset 64fbb616a0f3 (bug 1632249)
Backed out changeset 6f19f43e0a0b (bug 1632249)
Backed out changeset 073302d26c5e (bug 1632249)
Backed out changeset 7c94d37c446e (bug 1632249)
Backed out changeset 204b899f436d (bug 1632249)
2020-06-11 19:44:20 +03:00
sotaro c5381ed0cd Bug 1638819 - Skip SyncObjectD3D11Host::Synchronize() when RenderTextureHosts do not use ID3D11Texture2D r=jrmuizel
Simple implementation of skipping SyncObjectD3D11Host::Synchronize(). More optimization could be done in Bug 1635629.

Differential Revision: https://phabricator.services.mozilla.com/D75781
2020-06-11 07:28:30 +00:00
Emilio Cobos Álvarez 4cb5da08a2 Bug 1640623 - Use an enum class for LookAndFeel::FontID. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D76696
2020-06-11 11:27:58 +00:00
Jeff Gilbert 15ac3e9445 Bug 1632249 - Fix Bb failures. r=gw
> /builds/worker/checkouts/gecko/gfx/gl/SharedSurface.cpp:141:1: error: control reaches end of non-void function [-Werror=return-type]

Old compilers don't realize the switch being exhaustive means the
function always returns, which we workaround here.

Differential Revision: https://phabricator.services.mozilla.com/D78837
2020-06-11 06:37:43 +00:00
Jeff Gilbert 2ac2690670 Bug 1632249 - NON_PREMULT TextureClient iff NON_PREMULT CanvasClient. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D78800
2020-06-11 06:37:40 +00:00
Jeff Gilbert 06fa957778 Bug 1632249 - WebXR compositing fixes. r=imanol
Differential Revision: https://phabricator.services.mozilla.com/D78117
2020-06-11 06:37:36 +00:00
Jeff Gilbert cf3c8fedea Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-11 06:37:35 +00:00
Jamie Nicol 6ac8fcda94 Bug 1644732 - Don't call NotifyNotUsed() from ~RenderAndroidSurfaceTextureHostOGL(). r=sotaro
Doing so means it is called twice, which causes an assertion failure.

Differential Revision: https://phabricator.services.mozilla.com/D79127
2020-06-11 05:27:09 +00:00
Mihai Alexandru Michis 59ad7ed333 Backed out 6 changesets (bug 1632249) for causing bustages in CanvasRenderingContext2D.cpp
CLOSED TREE

Backed out changeset c93972b05d4f (bug 1632249)
Backed out changeset 04f5127c85d5 (bug 1632249)
Backed out changeset b15d91e64a25 (bug 1632249)
Backed out changeset 71ad2ed8e9ba (bug 1632249)
Backed out changeset 6e9a89ead3a5 (bug 1632249)
Backed out changeset dd00e2da3a0f (bug 1632249)
2020-06-11 02:43:35 +03:00
Jeff Gilbert 85f3804e14 Bug 1632249 - Fix Bb failures. r=gw
> /builds/worker/checkouts/gecko/gfx/gl/SharedSurface.cpp:141:1: error: control reaches end of non-void function [-Werror=return-type]

Old compilers don't realize the switch being exhaustive means the
function always returns, which we workaround here.

Differential Revision: https://phabricator.services.mozilla.com/D78837
2020-06-10 22:21:17 +00:00
Jeff Gilbert d415e13cc1 Bug 1632249 - NON_PREMULT TextureClient iff NON_PREMULT CanvasClient. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D78800
2020-06-10 22:21:09 +00:00
Jeff Gilbert 28d2828abe Bug 1632249 - WebXR compositing fixes. r=imanol
Differential Revision: https://phabricator.services.mozilla.com/D78117
2020-06-10 22:21:04 +00:00
Jeff Gilbert 9b09e54345 Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-10 22:21:02 +00:00
Kartikaya Gupta 6e27d8c5cc Bug 1644829 - Avoid using SimpleTest.is etc. in helper subtests run by runSubtestsSeriallyInFreshWindows. r=botond
Using `SimpleTest.is` directly instead of the "global" `is` installed by
runSubtestsSeriallyInFreshWindows means that the helper test filename doesn't
get emitted in the assertions, which is a nice thing to have. (Ditto for `ok`
and friends).

Problematic tests identified using:
for helper in helper_*.html; do
    if [[ $(grep "$helper" test_group*) ]]; then
        echo $helper;
        grep -e 'SimpleTest.\(is\|ok\)' "$helper";
    fi;
done

While it would be nice to catch this sort of thing directly in the code, it's
a bit tricky to do because SimpleTest.(ok|is) do get used legitimately by helper
methods that are used by group subtests and top-level tests.

Depends on D79171

Differential Revision: https://phabricator.services.mozilla.com/D79172
2020-06-10 19:35:48 +00:00
Kartikaya Gupta ff2651cdc1 Bug 1644829 - Add an `isnot` reflection to the subtest window as well. r=botond
Depends on D79170

Differential Revision: https://phabricator.services.mozilla.com/D79171
2020-06-10 19:35:45 +00:00
Kartikaya Gupta 2aba4a7dc4 Bug 1644829 - For consistency ensure all tests that use runSubtestsSeriallyInFreshWindows have a _group in the name. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D79170
2020-06-10 19:34:47 +00:00
Kartikaya Gupta 5e5dea416b Bug 1643459 - Remove APZ:TransformEnd observer after subtest is done. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D79173
2020-06-10 19:27:51 +00:00
Daosheng Mu 47c6c14def Bug 1643514 - Avoid requesting VR display when it already completed. r=kip,imanol
Differential Revision: https://phabricator.services.mozilla.com/D78437
2020-06-10 00:57:26 +00:00
Daosheng Mu d9e2924e6f Bug 1643514 - Clean up VRManager usage. r=kip,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D78436
2020-06-10 01:26:52 +00:00
Jamie Nicol 45d8be2493 Bug 1644678 - Don't set DEALLOCATE_CLIENT flag for SharedSurface_SurfaceTextures. r=sotaro
The flag is not required for SharedSurface_SurfaceTexture, as
GeckoSurfaceTexture is reference counted. When the GeckoSurface is
disposed on the client side it simply decrements the refcount of the
GeckoSurfaceTexture on the host side, which will remain alive until
the TextureHost's reference is also dropped.

Differential Revision: https://phabricator.services.mozilla.com/D79073
2020-06-10 14:03:55 +00:00
Simon Giesecke 82dc9b2271 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 10:46:14 +00:00
Kartikaya Gupta c6ee908c91 Bug 1643504 - Update webrender github-CI to use new docker image. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D78903
2020-06-09 20:39:10 +00:00
Butkovits Atila e3dce68834 Backed out 3 changesets (bug 1643289, bug 1642949) for causing failure at test_headless_screenshot.html. CLOSED TREE
Backed out changeset 98c420f73380 (bug 1643289)
Backed out changeset 9447ea8910aa (bug 1643289)
Backed out changeset 0c827da9d847 (bug 1642949)
2020-06-10 10:07:23 +03:00
Simon Giesecke d419f0ff08 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 05:49:28 +00:00
Hiroyuki Ikezoe d7e086f85f Bug 1644591 - Store AnimationStorageData as std::unique_ptr in std::unordered_map. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D79000
2020-06-09 23:37:01 +00:00