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

933 Коммитов

Автор SHA1 Сообщение Дата
Jeff Gilbert d517313a40 Bug 1697670 - Remove gfx::YUVColorSpace::UNKNOWN. r=mstange
Replace with Maybe<YUVColorSpace> where still needed.

Differential Revision: https://phabricator.services.mozilla.com/D107938
2021-03-19 00:58:23 +00:00
Csoregi Natalia e0c536d241 Backed out changeset f155cf6af343 (bug 1697670) for bustage on gfxUtils.cpp. CLOSED TREE 2021-03-17 02:41:15 +02:00
Jeff Gilbert 7d9b571b77 Bug 1697670 - Remove gfx::YUVColorSpace::UNKNOWN. r=mstange
Replace with Maybe<YUVColorSpace> where still needed.

Differential Revision: https://phabricator.services.mozilla.com/D107938
2021-03-16 23:25:54 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
sotaro e6275d7e5d Bug 1697155 - Add AllowSoftwareWebRenderOGL() to CompositorOptions to allow Software WebRender with CompositorOGL on a per widget basis r=aosmond
This is preparation of bug 1697096.

Differential Revision: https://phabricator.services.mozilla.com/D107638
2021-03-09 22:24:15 +00:00
Robert Mader f1206ef5d7 Bug 1695453 - Rename IsWaylandDisabled to IsWaylandEnabled, r=stransky
Inversed logic has been proven to be more difficult to read,
so use the simple positive variant.

Also add a simple sanity check for `WAYLAND_DISPLAY` so if people
set `MOZ_ENABLE_WAYLAND` in a X11 session don't get undesired behavior.

While on it, change a check for `XDG_SESSION_TYPE` to also use
`WAYLAND_DISPLAY`, improving behavior when launching FF from a TTY
or a TTY-launched session (e.g. via `weston-launch`).

`WAYLAND_DISPLAY` and `DISPLAY` are not expected to be set if
no Wayland or X11 server is available, so using them makes us behave
more predictable.

Differential Revision: https://phabricator.services.mozilla.com/D106726
2021-03-02 14:25:20 +00:00
Simon Giesecke 8ecfb38a41 Bug 1691913 - Remove uses of nsDataHashtable::GetValue. r=xpcom-reviewers,necko-reviewers,dragana,nika
GetValue is going to be removed in a subsequent patch. It is no longer needed,
because it can be replaced by functions already provided by nsBaseHashtable,
in particular Lookup and Contains.

Also, its name was confusing, since it specifically returns a pointer that
allows and is intended for modifying the entry within the hashtable, rather
than returning by-value. According to the naming rules to be set on
nsBaseHashtable, it would also needed to be renamed to "Lookup*. Removing
its uses saves this effort.

Differential Revision: https://phabricator.services.mozilla.com/D105476
2021-03-01 09:59:30 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Andrew Osmond c2b4fdeaa1 Bug 1694480 - Notify parent process of low virtual memory in GPU process. r=jrmuizel
On 32-bit Windows, we see crashes related to running out of virtual
memory address space in the GPU process. Prior to this patch, we did not
report any memory status information from the GPU process to the parent,
only from the parent to the GPU process. Now if we go below the
threshold we request memory to be cleared in the parent/content
processes. This should trickle down to the GPU process by freeing shared
memory resources such as images, allowing us to unmap them out of the
GPU process sooner.

We will see similar problems on any 32-bit platform. The only other
target of note with sufficient numbers is 32-bit Android. There is no
GPU process on Android, however we only monitor the virtual memory
address space on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D106286
2021-02-25 15:38:45 +00:00
Andrew Osmond 08a4397790 Bug 1688096 - Part 2. Add flag to CompositorOptions to allow SW-WR on a per widget basis. r=mattwoodrow
The pref gfx.webrender.software.unaccelerated-widget.allow may be used
to allow software WebRender to be used with new windows/popups that have
transparency on Windows. Otherwise they would fallback to basic layers.

Similarly, the pref gfx.webrender.software.unaccelerated-widget.force
may be used to force software WebRender for all windows that would
fallback to basic layers.

Differential Revision: https://phabricator.services.mozilla.com/D104855
2021-02-24 19:40:00 +00:00
Simon Giesecke 7c931c97c4 Bug 1689218 - Rename nsBaseHashtable::GetAndRemove to Extract. r=necko-reviewers,dragana
First, it should be called "Lookup" rather than "Get" because it returns
DataType (rather than UserDataType), but that would still be confusing,
since as opposed to other Lookup* methods, it does not return a DataType&
(and obviously, it can't). So "Extract" seems to be a better name, cf.
mozilla::Maybe::extract.

Differential Revision: https://phabricator.services.mozilla.com/D105471
2021-02-22 12:07:48 +00:00
Matt Woodrow 2b07ed805c Bug 1688813 - Draw position:fixed elements relative to the top-left of the document when using drawSnapshot. r=emilio,mstange
Differential Revision: https://phabricator.services.mozilla.com/D104935
2021-02-22 04:20:29 +00:00
Cosmin Sabou 0e81627e87 Backed out 2 changesets (bug 1688096) for win webrender sw_compositor related crashes. CLOSED TREE
Backed out changeset aa0d1698aff8 (bug 1688096)
Backed out changeset 3ad2f4d0c317 (bug 1688096)
2021-02-18 19:52:29 +02:00
Andrew Osmond c068c92afd Bug 1688096 - Part 2. Add/use flag to CompositorOptions to allow SW-WR on a per widget basis. r=mattwoodrow
The pref gfx.webrender.software.unaccelerated-widget.allow may be used
to allow software WebRender to be used with new windows/popups that have
transparency on Windows. Otherwise they would fallback to basic layers.

Similarly, the pref gfx.webrender.software.unaccelerated-widget.force
may be used to force software WebRender for all windows that would
fallback to basic layers.

Differential Revision: https://phabricator.services.mozilla.com/D104855
2021-02-18 15:37:47 +00:00
Alexis Beingessner ade0725530 Bug 1686616 - make GfxInfo use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105522
2021-02-18 13:26:29 +00:00
smolnar 0757c7413f Backed out 2 changesets (bug 1688096) for linux debug build bustage in KnowsCompositor. CLOSED TREE
Backed out changeset 6cdfa0af2278 (bug 1688096)
Backed out changeset 6471b0910f45 (bug 1688096)
2021-02-18 14:34:49 +02:00
Andrew Osmond 6528a201ab Bug 1688096 - Part 2. Add/use flag to CompositorOptions to allow SW-WR on a per widget basis. r=mattwoodrow
The pref gfx.webrender.software.unaccelerated-widget.allow may be used
to allow software WebRender to be used with new windows/popups that have
transparency on Windows. Otherwise they would fallback to basic layers.

Similarly, the pref gfx.webrender.software.unaccelerated-widget.force
may be used to force software WebRender for all windows that would
fallback to basic layers.

Differential Revision: https://phabricator.services.mozilla.com/D104855
2021-02-18 11:50:06 +00:00
Dorel Luca 847a939bb4 Backed out changeset 56ce2feb53e7 (bug 1688813) for Browser-chrome failures in browser_panelUINotifications_multiWindow.js. CLOSED TREE 2021-02-16 12:36:20 +02:00
Matt Woodrow cd814ab6a8 Bug 1688813 - Draw position:fixed elements relative to the top-left of the document when using drawSnapshot. r=emilio,mstange
Differential Revision: https://phabricator.services.mozilla.com/D104935
2021-02-16 07:38:51 +00:00
Matt Woodrow 2b2b87d224 Bug 1676409 - Attempt to resolve CrossProcessPaint objects for printing immediately, in case we didn't queue any dependencies. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D104782
2021-02-12 00:40:41 +00:00
Matt Woodrow b9928bb97d Bug 1682329 - Null check BrowserParent since it can have gone away mid-screenshot. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D104781
2021-02-12 00:40:40 +00:00
Matt Woodrow f9e8884de8 Bug 1541472 - Remove Advanced Layers, since it's disabled everywhere now. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D104592
2021-02-10 02:04:41 +00:00
Andrew Osmond 4a410a48ae Bug 1689203 - Allow fallback from WebRender to Software WebRender. r=jrmuizel
We can disable WebRender because the GPU process crashed, or we
encountered a graceful runtime error in WebRender. This patch adds two
new prefs to control how that fallback works.

gfx.webrender.fallback.software-d3d11 controls if WebRender falls back
to Software WebRender + D3D11 compositing. If true, and the user is
allowed to get Software WebRender, we will fallback to Software
WebRender with the D3D11 compositor first.

gfx.webrender.fallback.software controls if WebRender falls back to
Software WebRender. If true, and the user is allowed to get Software
WebRender, we will fallback to Software WebRender without the D3D11
compositor.

gfx.webrender.fallback.basic controls if WebRender or Software
WebRender falls back to Basic. If true, it falls back to Basic.
Otherwise it continues to use Software WebRender without the D3D11
compositor. Note that this means OpenGL on Android.

This patch also means that gfx.webrender.all=true and MOZ_WEBRENDER=1
no longer disables Software WebRender. It will still prefer (Hardware)
WebRender but we want to allow fallback to Software WebRender for
configurations that forced WebRender on.

Differential Revision: https://phabricator.services.mozilla.com/D103491
2021-02-01 23:36:36 +00:00
Butkovits Atila 6a81495553 Backed out changeset 7ba7ce64acae (bug 1689203) for causing failure on GfxConfigManager. CLOSED TREE 2021-02-02 01:33:00 +02:00
Andrew Osmond 2a606ea074 Bug 1689203 - Allow fallback from WebRender to Software WebRender. r=jrmuizel
We can disable WebRender because the GPU process crashed, or we
encountered a graceful runtime error in WebRender. This patch adds two
new prefs to control how that fallback works.

gfx.webrender.fallback.software-d3d11 controls if WebRender falls back
to Software WebRender + D3D11 compositing. If true, and the user is
allowed to get Software WebRender, we will fallback to Software
WebRender with the D3D11 compositor first.

gfx.webrender.fallback.software controls if WebRender falls back to
Software WebRender. If true, and the user is allowed to get Software
WebRender, we will fallback to Software WebRender without the D3D11
compositor.

gfx.webrender.fallback.basic controls if WebRender or Software
WebRender falls back to Basic. If true, it falls back to Basic.
Otherwise it continues to use Software WebRender without the D3D11
compositor. Note that this means OpenGL on Android.

This patch also means that gfx.webrender.all=true and MOZ_WEBRENDER=1
no longer disables Software WebRender. It will still prefer (Hardware)
WebRender but we want to allow fallback to Software WebRender for
configurations that forced WebRender on.

Differential Revision: https://phabricator.services.mozilla.com/D103491
2021-02-01 22:27:11 +00:00
Butkovits Atila 1d0218ffe2 Backed out changeset a3c9fce26dd1 (bug 1689203) for causing build bustages on GPUProcessManager.cpp. CLOSED TREE 2021-02-02 00:22:59 +02:00
Andrew Osmond 65ad480541 Bug 1689203 - Allow fallback from WebRender to Software WebRender. r=jrmuizel
We can disable WebRender because the GPU process crashed, or we
encountered a graceful runtime error in WebRender. This patch adds two
new prefs to control how that fallback works.

gfx.webrender.fallback.software-d3d11 controls if WebRender falls back
to Software WebRender + D3D11 compositing. If true, and the user is
allowed to get Software WebRender, we will fallback to Software
WebRender with the D3D11 compositor first.

gfx.webrender.fallback.software controls if WebRender falls back to
Software WebRender. If true, and the user is allowed to get Software
WebRender, we will fallback to Software WebRender without the D3D11
compositor.

gfx.webrender.fallback.basic controls if WebRender or Software
WebRender falls back to Basic. If true, it falls back to Basic.
Otherwise it continues to use Software WebRender without the D3D11
compositor. Note that this means OpenGL on Android.

This patch also means that gfx.webrender.all=true and MOZ_WEBRENDER=1
no longer disables Software WebRender. It will still prefer (Hardware)
WebRender but we want to allow fallback to Software WebRender for
configurations that forced WebRender on.

Differential Revision: https://phabricator.services.mozilla.com/D103491
2021-02-01 20:41:09 +00:00
sotaro b82da0489b Bug 1686974 - Add memory reporters to GPU process r=jrmuizel
On GPU Process gfxWindowsPlatform() is not created. Then some Windows specific memory reporters are not added in GPU Process.

Differential Revision: https://phabricator.services.mozilla.com/D102252
2021-01-19 14:11:20 +00:00
Andrew Osmond 9168cac006 Bug 1684170 - Decouple WebRender and Software WebRender gfxConfig features. r=jrmuizel
Lack of support of (hardware) WebRender should not block Software
WebRender support. This can happen when ANGLE isn't supported, for
example.

Differential Revision: https://phabricator.services.mozilla.com/D100445
2021-01-14 19:59:10 +00:00
Emilio Cobos Álvarez e42e32baf8 Bug 1683188 - CrossProcessPaint code shouldn't mess with tab state from the content process. r=mattwoodrow,NeilDeakin
There's JS running since we save the active status till we restore it,
so arbitrary things can happen, including receiving an IPC message from
the child saying that we're now really active.

If then we restore the wrong (old) status, stuff gets confused and
sadness ensues.

Screenshotting background tabs seems to work without this so it's not
clear to me why messing with the activeness state was necessary to begin
with.

Differential Revision: https://phabricator.services.mozilla.com/D101060
2021-01-11 19:52:10 +00:00
Jean-Yves Avenard 6f1544075f Bug 1681043 - P5. Recalculate decoder capabilities if CanUseHardwareVideoDecoding changes. r=alwu,bryce
Not the most elegant, but reworking the PDMFactory to be fully re-initialized would be a significant change, as only the WMFDecoderModule requires it we take some shortcuts.

Differential Revision: https://phabricator.services.mozilla.com/D100308
2021-01-06 08:33:28 +00:00
Jean-Yves Avenard dfb40277e0 Bug 1681043 - P3. Retrieve decoding capabilities in GPU or RDD process and pass it to content. r=alwu,bryce
Upon starting the RDD and GPU process; we check their decoding capabilities and send it to the parent process. It will then broadcast this information to all content children so that RemodeDecoderModule::Supports can return if a codec is supported or not.

Differential Revision: https://phabricator.services.mozilla.com/D100306
2021-01-06 09:05:31 +00:00
Andi-Bogdan Postelnicu 7b246e293f Bug 1683551 - Make `gfx` buildable outside of `unified-build` environment. r=sg,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D100209
2021-01-04 14:20:17 +00:00
Mihai Alexandru Michis f8a41209af Backed out 6 changesets (bug 1681043) for causing multiple failures.
CLOSED TREE

Backed out changeset ea075101dc94 (bug 1681043)
Backed out changeset 64d8abe2104d (bug 1681043)
Backed out changeset 5ecb208a85d3 (bug 1681043)
Backed out changeset 9319fdd0389c (bug 1681043)
Backed out changeset 25a015e84cc4 (bug 1681043)
Backed out changeset e8fac91d4012 (bug 1681043)
2021-01-04 07:43:08 +02:00
Jean-Yves Avenard 19f9c7de4d Bug 1681043 - P5. Recalculate decoder capabilities if CanUseHardwareVideoDecoding changes. r=alwu,bryce
Not the most elegant, but reworking the PDMFactory to be fully re-initialized would be a significant change, as only the WMFDecoderModule requires it we take some shortcuts.

Differential Revision: https://phabricator.services.mozilla.com/D100308
2021-01-03 23:24:07 +00:00
Jean-Yves Avenard ff614fdaa3 Bug 1681043 - P3. Retrieve decoding capabilities in GPU or RDD process and pass it to content. r=alwu,bryce
Upon starting the RDD and GPU process; we check their decoding capabilities and send it to the parent process. It will then broadcast this information to all content children so that RemodeDecoderModule::Supports can return if a codec is supported or not.

Differential Revision: https://phabricator.services.mozilla.com/D100306
2021-01-03 23:21:54 +00:00
Mihai Alexandru Michis 2aea8e093c Backed out changeset 465526830144 (bug 1684170) for causing talos failures.
CLOSED TREE
2020-12-25 07:04:27 +02:00
Andrew Osmond 1510060a56 Bug 1684170 - Decouple WebRender and Software WebRender gfxConfig features. r=jrmuizel
Lack of support of (hardware) WebRender should not block Software
WebRender support. This can happen when ANGLE isn't supported, for
example.

Differential Revision: https://phabricator.services.mozilla.com/D100445
2020-12-24 18:23:29 +00:00
Emilio Cobos Álvarez 3987c781d0 Bug 1635914 - Move active flag handling explicitly to BrowsingContext. r=nika
And have it mirror in the parent process more automatically.

The docShellIsActive setter in the browser-custom-element side needs to
be there rather than in the usual DidSet() calls because the
AsyncTabSwitcher code relies on getting an exact amount of notifications
as response to that specific setter. Not pretty, but...

BrowserChild no longer sets IsActive() on the docshell itself for OOP
iframes. This fixes bug 1679521. PresShell activeness is used to
throttle rAF as well, which handles OOP iframes nicely as well.

Differential Revision: https://phabricator.services.mozilla.com/D96072
2020-12-11 15:43:19 +00:00
Andrew Osmond e73a5b9a7c Bug 1681563 - Record WebRender device resets in telemetry and crash reports on non-Windows. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D99346
2020-12-10 14:26:32 +00:00
Simon Giesecke 4cab6ac723 Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
  of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
  and EnumSerializer.h)

This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D94459
2020-12-10 11:09:21 +00:00
Andrew Osmond 45b5262f91 Bug 1632698 - Better handle device resets when we don't have a GPU process. r=sotaro,kvark,nical
Aside from on Windows, we do not appear to handle device resets properly
without the GPU process. This patch adds in the necessary plumbing to
handle the device reset properly. It also ensures that whenever we check
for a device reset reason, we handle all of the reasons (e.g. not just
the NV video memory purge reset reason) to ensure they are not lost, and
handles them all consistently in the same manner.

It also tracks the number of device resets for thresholding purposes
with an in process compositor. While it will only disable WebRender on
Linux at this time, it will put a note in the critical log if the
threshold was exceeded on all platforms. This may prove useful in
evaluating whether or not we should do the same everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D98705
2020-12-07 20:36:11 +00:00
Bogdan Tara 10b26e1c74 Backed out changeset b6eb6c19057d (bug 1677094) for WebRender related crashes CLOSED TREE 2020-12-02 21:12:42 +02:00
Andrew Osmond 7c7282b4e4 Bug 1677094 - Assert if we lose WebRender if forced via MOZ_WEBRENDER env var. r=jrmuizel
We use MOZ_WEBRENDER to force WebRender on in our testing
infrastructure. We may silently fallback to basic during our tests if we
encounter an error and the test may pass as a result. It would be best
if we asserted we don't lose WebRender while testing.

Differential Revision: https://phabricator.services.mozilla.com/D97004
2020-12-02 17:03:12 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke ae75be244a Bug 1677466 - Split Endpoint.h and ProtocolMessageUtils.h from ProtocolUtils.h. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D93568

Depends on D93567
2020-11-23 16:06:42 +00:00
Simon Giesecke 5b3084384e Bug 1660470 - Move void_t/null_t to a new IPCCore.h header. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93546

Depends on D93544
2020-11-23 16:05:20 +00:00
Simon Giesecke c902104cdb Bug 1660470 - Split ShmemMessageUtils.h from Shmem.h. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93543

Depends on D93321
2020-11-23 16:05:02 +00:00
Simon Giesecke 93dd261db8 Bug 1660470 - Include C++ header files only from cpp file. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93233

Depends on D87865
2020-11-23 16:03:32 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00