From f57ad1f88d68aad51ac381406dcf3cca77db53c9 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 23 Jul 2019 15:33:13 +0000 Subject: [PATCH 1/5] Bug 1566369 - Lower the audioipc thread pool thread count to 1 on Linux. r=kinetik Differential Revision: https://phabricator.services.mozilla.com/D38170 --HG-- extra : moz-landing-system : lando --- modules/libpref/init/all.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 1051e71f8a04..6f33ebed7d88 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -465,7 +465,7 @@ pref("media.cubeb.logging_level", ""); // Cubeb sandbox (remoting) control #if defined(XP_LINUX) && !defined(MOZ_WIDGET_ANDROID) pref("media.cubeb.sandbox", true); -pref("media.audioipc.pool_size", 2); +pref("media.audioipc.pool_size", 1); // 64 * 4 kB stack per pool thread. pref("media.audioipc.stack_size", 262144); #else From 5ffd857a021bd2a0bd08880f72f840c35a69ea1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 24 Jul 2019 13:18:21 +0000 Subject: [PATCH 2/5] Bug 1551621 - Downgrade an assertion for now so as to not block people. r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D39155 --HG-- extra : moz-landing-system : lando --- dom/events/EventStateManager.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index f62103d28af9..59609dff200d 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -5479,9 +5479,14 @@ void EventStateManager::RemoveNodeFromChainIfNeeded(EventStates aState, MOZ_ASSERT(leaf); // XBL Likes to unbind content without notifying, thus the // NODE_IS_ANONYMOUS_ROOT check... - MOZ_ASSERT(nsContentUtils::ContentIsFlattenedTreeDescendantOf( - leaf, aContentRemoved) || - leaf->SubtreeRoot()->HasFlag(NODE_IS_ANONYMOUS_ROOT)); + // + // This can also happen for Shadow DOM sometimes, and it's not clear how to + // best handle it, see https://github.com/whatwg/html/issues/4795 and + // bug 1551621. + NS_ASSERTION(nsContentUtils::ContentIsFlattenedTreeDescendantOf( + leaf, aContentRemoved) || + leaf->SubtreeRoot()->HasFlag(NODE_IS_ANONYMOUS_ROOT), + "Flat tree and active / hover chain got out of sync"); nsIContent* newLeaf = aContentRemoved->GetFlattenedTreeParent(); MOZ_ASSERT_IF(newLeaf, newLeaf->IsElement() && From 6179d86a65df4e6beff26aa51dca214a324ae8cc Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 24 Jul 2019 13:22:07 +0000 Subject: [PATCH 3/5] Bug 1568285. Stop implementing JS-exposed QueryInterface for TreeColumns and TreeContentView. r=peterv Differential Revision: https://phabricator.services.mozilla.com/D39077 --HG-- extra : moz-landing-system : lando --- dom/webidl/LegacyQueryInterface.webidl | 2 -- 1 file changed, 2 deletions(-) diff --git a/dom/webidl/LegacyQueryInterface.webidl b/dom/webidl/LegacyQueryInterface.webidl index 9ca4f9a10cae..24a44fa53735 100644 --- a/dom/webidl/LegacyQueryInterface.webidl +++ b/dom/webidl/LegacyQueryInterface.webidl @@ -17,6 +17,4 @@ interface LegacyQueryInterface { }; Element implements LegacyQueryInterface; -TreeColumns implements LegacyQueryInterface; -TreeContentView implements LegacyQueryInterface; Window implements LegacyQueryInterface; From 1dba48a76de8e25c0b29c1a1ac1dbb0adf4839cb Mon Sep 17 00:00:00 2001 From: Micah Tigley Date: Tue, 23 Jul 2019 23:02:39 +0000 Subject: [PATCH 4/5] Bug 1567335 - Make sure the animation class for the foreground element is removed. r=gl Differential Revision: https://phabricator.services.mozilla.com/D38805 --HG-- extra : moz-landing-system : lando --- devtools/client/inspector/markup/utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devtools/client/inspector/markup/utils.js b/devtools/client/inspector/markup/utils.js index d234e4bb2bb7..06609676a50c 100644 --- a/devtools/client/inspector/markup/utils.js +++ b/devtools/client/inspector/markup/utils.js @@ -66,6 +66,8 @@ function flashElementOff( backgroundElt.classList.remove(backgroundClass); foregroundElt.classList.remove("theme-fg-contrast"); + // Make sure the foreground animation class is removed + foregroundElt.classList.remove("flash-out"); [].forEach.call( foregroundElt.querySelectorAll("[class*=theme-fg-color]"), span => span.classList.remove("theme-fg-contrast") From b8b7b6195ff325fc33e29caef513c035fa4dcb61 Mon Sep 17 00:00:00 2001 From: sotaro Date: Wed, 24 Jul 2019 13:33:57 +0000 Subject: [PATCH 5/5] Bug 1568419 - Handle a case that NumSubTextures() returns 0 in AsyncImagePipelineManager::UpdateImageKeys() r=nical GPUVideoTextureHost::NumSubTextures() returns 0 when wrapped TextureHost does not exist. In this case, we do not have a content of GPUVideoTextureHost for WR render. And EnsureWrappedTextureHost() calling is added in GPUVideoTextureHost::NumSubTextures(), since GPUVideoTextureHost is not explicit about when a wrapped TextureHost is created. Differential Revision: https://phabricator.services.mozilla.com/D39137 --HG-- extra : moz-landing-system : lando --- gfx/layers/composite/GPUVideoTextureHost.cpp | 8 ++++---- gfx/layers/composite/GPUVideoTextureHost.h | 2 +- gfx/layers/composite/TextureHost.cpp | 2 +- gfx/layers/composite/TextureHost.h | 4 ++-- gfx/layers/d3d11/TextureD3D11.cpp | 4 ++-- gfx/layers/d3d11/TextureD3D11.h | 4 ++-- gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp | 2 +- gfx/layers/opengl/MacIOSurfaceTextureHostOGL.h | 2 +- gfx/layers/wr/AsyncImagePipelineManager.cpp | 6 ++++-- gfx/layers/wr/WebRenderTextureHost.cpp | 2 +- gfx/layers/wr/WebRenderTextureHost.h | 2 +- 11 files changed, 20 insertions(+), 18 deletions(-) diff --git a/gfx/layers/composite/GPUVideoTextureHost.cpp b/gfx/layers/composite/GPUVideoTextureHost.cpp index 2e42561d73a0..427e971da334 100644 --- a/gfx/layers/composite/GPUVideoTextureHost.cpp +++ b/gfx/layers/composite/GPUVideoTextureHost.cpp @@ -118,12 +118,12 @@ void GPUVideoTextureHost::CreateRenderTexture( EnsureWrappedTextureHost()->CreateRenderTexture(aExternalImageId); } -uint32_t GPUVideoTextureHost::NumSubTextures() const { - MOZ_ASSERT(mWrappedTextureHost); - if (!mWrappedTextureHost) { +uint32_t GPUVideoTextureHost::NumSubTextures() { + MOZ_ASSERT(EnsureWrappedTextureHost()); + if (!EnsureWrappedTextureHost()) { return 0; } - return mWrappedTextureHost->NumSubTextures(); + return EnsureWrappedTextureHost()->NumSubTextures(); } void GPUVideoTextureHost::PushResourceUpdates( diff --git a/gfx/layers/composite/GPUVideoTextureHost.h b/gfx/layers/composite/GPUVideoTextureHost.h index 1cae5bd97598..10192b5d587a 100644 --- a/gfx/layers/composite/GPUVideoTextureHost.h +++ b/gfx/layers/composite/GPUVideoTextureHost.h @@ -50,7 +50,7 @@ class GPUVideoTextureHost : public TextureHost { void CreateRenderTexture( const wr::ExternalImageId& aExternalImageId) override; - uint32_t NumSubTextures() const override; + uint32_t NumSubTextures() override; void PushResourceUpdates(wr::TransactionBuilder& aResources, ResourceUpdateOp aOp, diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index 5f96adab1aa6..7f2fb620618a 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -574,7 +574,7 @@ void BufferTextureHost::CreateRenderTexture( texture.forget()); } -uint32_t BufferTextureHost::NumSubTextures() const { +uint32_t BufferTextureHost::NumSubTextures() { if (GetFormat() == gfx::SurfaceFormat::YUV) { return 3; } diff --git a/gfx/layers/composite/TextureHost.h b/gfx/layers/composite/TextureHost.h index aff68284bd14..0a2d78b4c9bf 100644 --- a/gfx/layers/composite/TextureHost.h +++ b/gfx/layers/composite/TextureHost.h @@ -642,7 +642,7 @@ class TextureHost : public AtomicRefCountedWithFinalize { /// Returns the number of actual textures that will be used to render this. /// For example in a lot of YUV cases it will be 3 - virtual uint32_t NumSubTextures() const { return 1; } + virtual uint32_t NumSubTextures() { return 1; } enum ResourceUpdateOp { ADD_IMAGE, @@ -777,7 +777,7 @@ class BufferTextureHost : public TextureHost { void CreateRenderTexture( const wr::ExternalImageId& aExternalImageId) override; - uint32_t NumSubTextures() const override; + uint32_t NumSubTextures() override; void PushResourceUpdates(wr::TransactionBuilder& aResources, ResourceUpdateOp aOp, diff --git a/gfx/layers/d3d11/TextureD3D11.cpp b/gfx/layers/d3d11/TextureD3D11.cpp index ffffb40d8e1b..6be31491f229 100644 --- a/gfx/layers/d3d11/TextureD3D11.cpp +++ b/gfx/layers/d3d11/TextureD3D11.cpp @@ -983,7 +983,7 @@ void DXGITextureHostD3D11::CreateRenderTexture( texture.forget()); } -uint32_t DXGITextureHostD3D11::NumSubTextures() const { +uint32_t DXGITextureHostD3D11::NumSubTextures() { switch (GetFormat()) { case gfx::SurfaceFormat::R8G8B8X8: case gfx::SurfaceFormat::R8G8B8A8: @@ -1243,7 +1243,7 @@ void DXGIYCbCrTextureHostD3D11::CreateRenderTexture( texture.forget()); } -uint32_t DXGIYCbCrTextureHostD3D11::NumSubTextures() const { +uint32_t DXGIYCbCrTextureHostD3D11::NumSubTextures() { // ycbcr use 3 sub textures. return 3; } diff --git a/gfx/layers/d3d11/TextureD3D11.h b/gfx/layers/d3d11/TextureD3D11.h index 0a86772c9c6a..5f1d157be6dd 100644 --- a/gfx/layers/d3d11/TextureD3D11.h +++ b/gfx/layers/d3d11/TextureD3D11.h @@ -342,7 +342,7 @@ class DXGITextureHostD3D11 : public TextureHost { void CreateRenderTexture( const wr::ExternalImageId& aExternalImageId) override; - uint32_t NumSubTextures() const override; + uint32_t NumSubTextures() override; void PushResourceUpdates(wr::TransactionBuilder& aResources, ResourceUpdateOp aOp, @@ -409,7 +409,7 @@ class DXGIYCbCrTextureHostD3D11 : public TextureHost { void CreateRenderTexture( const wr::ExternalImageId& aExternalImageId) override; - uint32_t NumSubTextures() const override; + uint32_t NumSubTextures() override; void PushResourceUpdates(wr::TransactionBuilder& aResources, ResourceUpdateOp aOp, diff --git a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp index 590501420e93..ef746989537a 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp +++ b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp @@ -131,7 +131,7 @@ void MacIOSurfaceTextureHostOGL::CreateRenderTexture( texture.forget()); } -uint32_t MacIOSurfaceTextureHostOGL::NumSubTextures() const { +uint32_t MacIOSurfaceTextureHostOGL::NumSubTextures() { switch (GetFormat()) { case gfx::SurfaceFormat::R8G8B8X8: case gfx::SurfaceFormat::R8G8B8A8: diff --git a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.h b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.h index 672737459bba..a2140a99a6e0 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.h +++ b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.h @@ -66,7 +66,7 @@ class MacIOSurfaceTextureHostOGL : public TextureHost { void CreateRenderTexture( const wr::ExternalImageId& aExternalImageId) override; - uint32_t NumSubTextures() const override; + uint32_t NumSubTextures() override; void PushResourceUpdates(wr::TransactionBuilder& aResources, ResourceUpdateOp aOp, diff --git a/gfx/layers/wr/AsyncImagePipelineManager.cpp b/gfx/layers/wr/AsyncImagePipelineManager.cpp index f9ba047f773f..1fd442b28c65 100644 --- a/gfx/layers/wr/AsyncImagePipelineManager.cpp +++ b/gfx/layers/wr/AsyncImagePipelineManager.cpp @@ -223,8 +223,9 @@ Maybe AsyncImagePipelineManager::UpdateImageKeys( return Nothing(); } - if (!texture) { - // We don't have a new texture, there isn't much we can do. + if (!texture || texture->NumSubTextures() == 0) { + // We don't have a new texture or texture does not have SubTextures, there + // isn't much we can do. aKeys = aPipeline->mKeys; return Nothing(); } @@ -243,6 +244,7 @@ Maybe AsyncImagePipelineManager::UpdateImageKeys( // The non-external image code path falls back to converting the texture into // an rgb image. auto numKeys = useExternalImage ? texture->NumSubTextures() : 1; + MOZ_ASSERT(numKeys > 0); // If we already had a texture and the format hasn't changed, better to reuse // the image keys than create new ones. diff --git a/gfx/layers/wr/WebRenderTextureHost.cpp b/gfx/layers/wr/WebRenderTextureHost.cpp index c91bb432e26a..47ebac67ca47 100644 --- a/gfx/layers/wr/WebRenderTextureHost.cpp +++ b/gfx/layers/wr/WebRenderTextureHost.cpp @@ -201,7 +201,7 @@ bool WebRenderTextureHost::HasIntermediateBuffer() const { return mWrappedTextureHost->HasIntermediateBuffer(); } -uint32_t WebRenderTextureHost::NumSubTextures() const { +uint32_t WebRenderTextureHost::NumSubTextures() { MOZ_ASSERT(mWrappedTextureHost); return mWrappedTextureHost->NumSubTextures(); } diff --git a/gfx/layers/wr/WebRenderTextureHost.h b/gfx/layers/wr/WebRenderTextureHost.h index 0ed19ff3ea8d..0b2e54b807d3 100644 --- a/gfx/layers/wr/WebRenderTextureHost.h +++ b/gfx/layers/wr/WebRenderTextureHost.h @@ -69,7 +69,7 @@ class WebRenderTextureHost : public TextureHost { bool HasIntermediateBuffer() const override; - uint32_t NumSubTextures() const override; + uint32_t NumSubTextures() override; void PushResourceUpdates(wr::TransactionBuilder& aResources, ResourceUpdateOp aOp,