- Revision
- 266591
- Author
- [email protected]
- Date
- 2020-09-04 04:16:27 -0700 (Fri, 04 Sep 2020)
Log Message
Merge r266000 - [GTK][WPE] Debug crashes in backdrop filter tests
https://bugs.webkit.org/show_bug.cgi?id=215209
Patch by Carlos Garcia Campos <[email protected]> on 2020-08-20
Reviewed by Adrian Perez de Castro.
Source/WebCore:
This only happens in WKTR because RenderLayerCompositor::flushPendingLayerChanges() is called from
RenderLayerCompositor::layerTreeAsText(), so the coordinator doesn't know layers are being flushed and we don't
return early from notifyFlushRequired(). We don't really need to have a coordinator associated to the backdrop
layer, we just need to attach the layer to the coordinator to ensure it's updated.
* platform/graphics/nicosia/NicosiaAnimation.cpp:
(Nicosia::Animation::applyInternal): Handle AnimatedPropertyWebkitBackdropFilter.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer): Detach also the backdrop layer.
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): Attach the backdrop layer to the
coordinator if there's one.
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers): Do not call this for the
backdrop layer.
(WebCore::CoordinatedGraphicsLayer::invalidateCoordinator): Set coordinator to nullptr.
(WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded): Set the coordinator and attach
the layer. Also attach the backdrop layer.
(WebCore::CoordinatedGraphicsLayer::setCoordinator): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
Source/WebKit:
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::~CompositingCoordinator): Use invalidateCoordinator() instead of setCoordinator()
that has been removed.
(WebKit::CompositingCoordinator::createGraphicsLayer): Use setCoordinatorIncludingSubLayersIfNeeded() instead of
attaching the layer directly.
(WebKit::CompositingCoordinator::attachLayer): Do not call setCoordinator(), the caller is expected to set the
coordinator.
LayoutTests:
Remove expectations for tests that are now passing.
* platform/glib/TestExpectations:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.30/LayoutTests/ChangeLog (266590 => 266591)
--- releases/WebKitGTK/webkit-2.30/LayoutTests/ChangeLog 2020-09-04 11:16:19 UTC (rev 266590)
+++ releases/WebKitGTK/webkit-2.30/LayoutTests/ChangeLog 2020-09-04 11:16:27 UTC (rev 266591)
@@ -1,3 +1,14 @@
+2020-08-20 Carlos Garcia Campos <[email protected]>
+
+ [GTK][WPE] Debug crashes in backdrop filter tests
+ https://bugs.webkit.org/show_bug.cgi?id=215209
+
+ Reviewed by Adrian Perez de Castro.
+
+ Remove expectations for tests that are now passing.
+
+ * platform/glib/TestExpectations:
+
2020-08-20 Lauro Moura <[email protected]>
REGRESSION(r265856) [GTK][WPE] hybi websockets tests failing
Modified: releases/WebKitGTK/webkit-2.30/LayoutTests/platform/glib/TestExpectations (266590 => 266591)
--- releases/WebKitGTK/webkit-2.30/LayoutTests/platform/glib/TestExpectations 2020-09-04 11:16:19 UTC (rev 266590)
+++ releases/WebKitGTK/webkit-2.30/LayoutTests/platform/glib/TestExpectations 2020-09-04 11:16:27 UTC (rev 266591)
@@ -180,17 +180,6 @@
webkit.org/b/169988 css3/filters/backdrop/backdrop-filter-with-reflection.html [ ImageOnlyFailure ]
webkit.org/b/169988 css3/filters/backdrop/effect-hw.html [ ImageOnlyFailure ]
-webkit.org/b/215209 [ Debug ] css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html [ Crash ]
-webkit.org/b/215209 [ Debug ] css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html [ Crash ]
-webkit.org/b/215209 [ Debug ] css3/filters/backdrop/backdrop-filter-with-cliprect.html [ Crash ]
-webkit.org/b/215209 [ Debug ] css3/filters/backdrop/backdrop-filter-with-mask.html [ Crash ]
-webkit.org/b/215209 [ Debug ] css3/filters/backdrop/backdrop-with-visibility-hidden-changing.html [ Crash ]
-webkit.org/b/215209 [ Debug ] css3/filters/backdrop/backdrop-with-visibility-hidden.html [ Crash ]
-webkit.org/b/215209 [ Debug ] css3/filters/backdrop/resource-use-add-more-layers.html [ Crash ]
-webkit.org/b/215209 [ Debug ] css3/filters/backdrop/resource-use-excessive.html [ Crash ]
-webkit.org/b/215209 [ Debug ] css3/filters/backdrop/resource-use-ok.html [ Crash ]
-webkit.org/b/215209 [ Debug ] css3/filters/backdrop/resource-use-remove-some-layers.html [ Crash ]
-
webkit.org/b/214682 imported/w3c/web-platform-tests/css/cssom/stylesheet-same-origin.sub.html [ Pass Failure ]
#////////////////////////////////////////////////////////////////////////////////////////
Modified: releases/WebKitGTK/webkit-2.30/Source/WebCore/ChangeLog (266590 => 266591)
--- releases/WebKitGTK/webkit-2.30/Source/WebCore/ChangeLog 2020-09-04 11:16:19 UTC (rev 266590)
+++ releases/WebKitGTK/webkit-2.30/Source/WebCore/ChangeLog 2020-09-04 11:16:27 UTC (rev 266591)
@@ -1,3 +1,29 @@
+2020-08-20 Carlos Garcia Campos <[email protected]>
+
+ [GTK][WPE] Debug crashes in backdrop filter tests
+ https://bugs.webkit.org/show_bug.cgi?id=215209
+
+ Reviewed by Adrian Perez de Castro.
+
+ This only happens in WKTR because RenderLayerCompositor::flushPendingLayerChanges() is called from
+ RenderLayerCompositor::layerTreeAsText(), so the coordinator doesn't know layers are being flushed and we don't
+ return early from notifyFlushRequired(). We don't really need to have a coordinator associated to the backdrop
+ layer, we just need to attach the layer to the coordinator to ensure it's updated.
+
+ * platform/graphics/nicosia/NicosiaAnimation.cpp:
+ (Nicosia::Animation::applyInternal): Handle AnimatedPropertyWebkitBackdropFilter.
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer): Detach also the backdrop layer.
+ (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): Attach the backdrop layer to the
+ coordinator if there's one.
+ (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers): Do not call this for the
+ backdrop layer.
+ (WebCore::CoordinatedGraphicsLayer::invalidateCoordinator): Set coordinator to nullptr.
+ (WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded): Set the coordinator and attach
+ the layer. Also attach the backdrop layer.
+ (WebCore::CoordinatedGraphicsLayer::setCoordinator): Deleted.
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+
2020-09-01 Carlos Garcia Campos <[email protected]>
[Linux] Web Inspector: show per thread cpu usage
Modified: releases/WebKitGTK/webkit-2.30/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.cpp (266590 => 266591)
--- releases/WebKitGTK/webkit-2.30/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.cpp 2020-09-04 11:16:19 UTC (rev 266590)
+++ releases/WebKitGTK/webkit-2.30/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.cpp 2020-09-04 11:16:27 UTC (rev 266591)
@@ -317,6 +317,9 @@
applicationResults.opacity = applyOpacityAnimation((static_cast<const FloatAnimationValue&>(from).value()), (static_cast<const FloatAnimationValue&>(to).value()), progress);
return;
case AnimatedPropertyFilter:
+#if ENABLE(FILTERS_LEVEL_2)
+ case AnimatedPropertyWebkitBackdropFilter:
+#endif
applicationResults.filters = applyFilterAnimation(static_cast<const FilterAnimationValue&>(from).value(), static_cast<const FilterAnimationValue&>(to).value(), progress, m_boxSize);
return;
default:
Modified: releases/WebKitGTK/webkit-2.30/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (266590 => 266591)
--- releases/WebKitGTK/webkit-2.30/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2020-09-04 11:16:19 UTC (rev 266590)
+++ releases/WebKitGTK/webkit-2.30/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2020-09-04 11:16:27 UTC (rev 266591)
@@ -160,6 +160,8 @@
{
if (m_coordinator) {
purgeBackingStores();
+ if (m_backdropLayer)
+ m_coordinator->detachLayer(m_backdropLayer.get());
m_coordinator->detachLayer(this);
}
ASSERT(!m_nicosia.imageBacking);
@@ -941,7 +943,8 @@
m_backdropLayer->setAnchorPoint(FloatPoint3D());
m_backdropLayer->setMasksToBounds(true);
m_backdropLayer->setName("backdrop");
- m_backdropLayer->setCoordinatorIncludingSubLayersIfNeeded(m_coordinator);
+ if (m_coordinator)
+ m_coordinator->attachLayer(m_backdropLayer.get());
}
m_backdropLayer->setContentsVisible(m_contentsVisible);
m_backdropLayer->setFilters(m_backdropFilters);
@@ -1011,9 +1014,6 @@
if (maskLayer())
downcast<CoordinatedGraphicsLayer>(*maskLayer()).syncPendingStateChangesIncludingSubLayers();
- if (m_backdropLayer)
- m_backdropLayer->syncPendingStateChangesIncludingSubLayers();
-
for (auto& child : children())
downcast<CoordinatedGraphicsLayer>(child.get()).syncPendingStateChangesIncludingSubLayers();
}
@@ -1194,9 +1194,9 @@
notifyFlushRequired();
}
-void CoordinatedGraphicsLayer::setCoordinator(CoordinatedGraphicsLayerClient* coordinator)
+void CoordinatedGraphicsLayer::invalidateCoordinator()
{
- m_coordinator = coordinator;
+ m_coordinator = nullptr;
}
void CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded(CoordinatedGraphicsLayerClient* coordinator)
@@ -1221,9 +1221,14 @@
// We need to update here the layer changeMask so the scene gets all the current values.
m_nicosia.delta.value = UINT_MAX;
- coordinator->attachLayer(this);
+ m_coordinator = coordinator;
+ m_coordinator->attachLayer(this);
+
+ if (m_backdropLayer)
+ m_coordinator->attachLayer(m_backdropLayer.get());
+
for (auto& child : children())
- downcast<CoordinatedGraphicsLayer>(child.get()).setCoordinatorIncludingSubLayersIfNeeded(coordinator);
+ downcast<CoordinatedGraphicsLayer>(child.get()).setCoordinatorIncludingSubLayersIfNeeded(m_coordinator);
}
const RefPtr<Nicosia::CompositionLayer>& CoordinatedGraphicsLayer::compositionLayer() const
Modified: releases/WebKitGTK/webkit-2.30/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (266590 => 266591)
--- releases/WebKitGTK/webkit-2.30/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2020-09-04 11:16:19 UTC (rev 266590)
+++ releases/WebKitGTK/webkit-2.30/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2020-09-04 11:16:27 UTC (rev 266591)
@@ -127,7 +127,7 @@
IntRect transformedVisibleRect();
- void setCoordinator(CoordinatedGraphicsLayerClient*);
+ void invalidateCoordinator();
void setCoordinatorIncludingSubLayersIfNeeded(CoordinatedGraphicsLayerClient*);
void setNeedsVisibleRectAdjustment();
Modified: releases/WebKitGTK/webkit-2.30/Source/WebKit/ChangeLog (266590 => 266591)
--- releases/WebKitGTK/webkit-2.30/Source/WebKit/ChangeLog 2020-09-04 11:16:19 UTC (rev 266590)
+++ releases/WebKitGTK/webkit-2.30/Source/WebKit/ChangeLog 2020-09-04 11:16:27 UTC (rev 266591)
@@ -1,3 +1,18 @@
+2020-08-20 Carlos Garcia Campos <[email protected]>
+
+ [GTK][WPE] Debug crashes in backdrop filter tests
+ https://bugs.webkit.org/show_bug.cgi?id=215209
+
+ Reviewed by Adrian Perez de Castro.
+
+ * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
+ (WebKit::CompositingCoordinator::~CompositingCoordinator): Use invalidateCoordinator() instead of setCoordinator()
+ that has been removed.
+ (WebKit::CompositingCoordinator::createGraphicsLayer): Use setCoordinatorIncludingSubLayersIfNeeded() instead of
+ attaching the layer directly.
+ (WebKit::CompositingCoordinator::attachLayer): Do not call setCoordinator(), the caller is expected to set the
+ coordinator.
+
2020-08-20 Lauro Moura <[email protected]>
REGRESSION(r265856) [GTK][WPE] hybi websockets tests failing
Modified: releases/WebKitGTK/webkit-2.30/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp (266590 => 266591)
--- releases/WebKitGTK/webkit-2.30/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp 2020-09-04 11:16:19 UTC (rev 266590)
+++ releases/WebKitGTK/webkit-2.30/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp 2020-09-04 11:16:27 UTC (rev 266591)
@@ -72,7 +72,7 @@
ASSERT(!m_rootLayer);
for (auto& registeredLayer : m_registeredLayers.values())
- registeredLayer->setCoordinator(nullptr);
+ registeredLayer->invalidateCoordinator();
}
void CompositingCoordinator::invalidate()
@@ -231,7 +231,7 @@
Ref<GraphicsLayer> CompositingCoordinator::createGraphicsLayer(GraphicsLayer::Type layerType, GraphicsLayerClient& client)
{
auto layer = adoptRef(*new CoordinatedGraphicsLayer(layerType, client));
- attachLayer(layer.ptr());
+ layer->setCoordinatorIncludingSubLayersIfNeeded(this);
return layer;
}
@@ -279,7 +279,6 @@
void CompositingCoordinator::attachLayer(CoordinatedGraphicsLayer* layer)
{
- layer->setCoordinator(this);
{
auto& compositionLayer = layer->compositionLayer();
m_nicosia.state.layers.add(compositionLayer);