Title: [257309] releases/WebKitGTK/webkit-2.28
- Revision
- 257309
- Author
- carlo...@webkit.org
- Date
- 2020-02-25 07:59:21 -0800 (Tue, 25 Feb 2020)
Log Message
Merge r256214 - WebContent jetsams on Sony lens webpage due to spike of IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=207493
rdar://problem/59020443
Reviewed by Zalan Bujtas.
Source/WebCore:
There were three issues that contributed to massive backing store allocation on
<https://www.sony.com/electronics/lenses/t/camera-lenses>.
The first, fixed in r256095, was that the Web Animations code unioned the untransitioning
bounds with the transitioning bounds, causing the computation of large extent rects.
The second, fixed in r256181, was that GraphicsLayerCA would keep hold of a transform
animation for an extra frame, causing a rendering update where
RenderLayerBacking::updateGeometry() would have cleared the extent, but GraphicsLayerCA
still thought transform was animating, causing GraphicsLayerCA::updateCoverage() to keep
backing store attached.
This patch is the final fix; when animations start and end, we need to ensure that
RenderLayerBacking::updateGeometry() is called so that we compute the animation extent in
the same frame that adds the animation.
Test: compositing/backing/transition-extent.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::animationFinished):
LayoutTests:
Test with an out-of-view transitioning element which should not get backing store.
* compositing/backing/transition-extent-expected.txt: Added.
* compositing/backing/transition-extent.html: Added.
* platform/ios-wk2/compositing/backing/transition-extent-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.28/LayoutTests/ChangeLog (257308 => 257309)
--- releases/WebKitGTK/webkit-2.28/LayoutTests/ChangeLog 2020-02-25 15:59:14 UTC (rev 257308)
+++ releases/WebKitGTK/webkit-2.28/LayoutTests/ChangeLog 2020-02-25 15:59:21 UTC (rev 257309)
@@ -85,6 +85,20 @@
* legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport.html: Added.
* legacy-animation-engine/compositing/layer-creation/translate-animation-overlap-expected.txt:
* legacy-animation-engine/compositing/layer-creation/translate-scale-animation-overlap-expected.txt:
+2020-02-10 Simon Fraser <simon.fra...@apple.com>
+
+ WebContent jetsams on Sony lens webpage due to spike of IOSurfaces
+ https://bugs.webkit.org/show_bug.cgi?id=207493
+ rdar://problem/59020443
+
+ Reviewed by Zalan Bujtas.
+
+ Test with an out-of-view transitioning element which should not get backing store.
+
+ * compositing/backing/transition-extent-expected.txt: Added.
+ * compositing/backing/transition-extent.html: Added.
+ * platform/ios-wk2/compositing/backing/transition-extent-expected.txt: Added.
+
* platform/ios-wk2/compositing/backing/backing-store-attachment-animating-outside-viewport-expected.txt: Added.
* platform/ios-wk2/legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport-expected.txt: Added.
Added: releases/WebKitGTK/webkit-2.28/LayoutTests/compositing/backing/transition-extent-expected.txt (0 => 257309)
--- releases/WebKitGTK/webkit-2.28/LayoutTests/compositing/backing/transition-extent-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.28/LayoutTests/compositing/backing/transition-extent-expected.txt 2020-02-25 15:59:21 UTC (rev 257309)
@@ -0,0 +1,31 @@
+The second box should not have attached backing store.
+
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 785.00 2024.00)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 785.00 2024.00)
+ (contentsOpaque 1)
+ (backingStoreAttached 1)
+ (children 2
+ (GraphicsLayer
+ (position 20.00 20.00)
+ (bounds 100.00 100.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ (GraphicsLayer
+ (position 20.00 1500.00)
+ (bounds 100.00 100.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 0)
+ )
+ )
+ )
+ )
+)
+visible boxhidden box
Added: releases/WebKitGTK/webkit-2.28/LayoutTests/compositing/backing/transition-extent.html (0 => 257309)
--- releases/WebKitGTK/webkit-2.28/LayoutTests/compositing/backing/transition-extent.html (rev 0)
+++ releases/WebKitGTK/webkit-2.28/LayoutTests/compositing/backing/transition-extent.html 2020-02-25 15:59:21 UTC (rev 257309)
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ height: 2000px;
+ }
+
+ .box {
+ position: absolute;
+ left: 20px;
+ top: 20px;
+ width: 100px;
+ height: 100px;
+ background-color: silver;
+ transition: transform 2s;
+ transform: rotate3d(0, 0, 1, 0deg)
+ }
+
+ body.changed .box {
+ transform: rotate3d(0, 0, 1, -180deg);
+ }
+
+ .invisible {
+ top: 1500px;
+ }
+ </style>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+ window.addEventListener('load', () => {
+ let box = document.querySelector('.box');
+ box.addEventListener('transitionstart', () => {
+ requestAnimationFrame(() => {
+ var out = document.getElementById('layers');
+ out.innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED);
+ testRunner.notifyDone();
+ });
+ }, false);
+
+ requestAnimationFrame(() => {
+ document.body.classList.add('changed');
+ });
+ }, false);
+ </script>
+</head>
+<body>
+ <p>The second box should not have attached backing store.</p>
+<pre id="layers"></pre>
+ <div class="box">visible box</div>
+ <div class="invisible box">hidden box</div>
+</body>
+</html>
Added: releases/WebKitGTK/webkit-2.28/LayoutTests/platform/ios-wk2/compositing/backing/transition-extent-expected.txt (0 => 257309)
--- releases/WebKitGTK/webkit-2.28/LayoutTests/platform/ios-wk2/compositing/backing/transition-extent-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.28/LayoutTests/platform/ios-wk2/compositing/backing/transition-extent-expected.txt 2020-02-25 15:59:21 UTC (rev 257309)
@@ -0,0 +1,31 @@
+The second box should not have attached backing store.
+
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 2024.00)
+ (backingStoreAttached 1)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 2024.00)
+ (contentsOpaque 1)
+ (backingStoreAttached 1)
+ (children 2
+ (GraphicsLayer
+ (position 20.00 20.00)
+ (bounds 100.00 100.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 1)
+ )
+ (GraphicsLayer
+ (position 20.00 1500.00)
+ (bounds 100.00 100.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ (backingStoreAttached 0)
+ )
+ )
+ )
+ )
+)
+visible boxhidden box
Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog (257308 => 257309)
--- releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog 2020-02-25 15:59:14 UTC (rev 257308)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog 2020-02-25 15:59:21 UTC (rev 257309)
@@ -154,7 +154,37 @@
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::constraintsForLine):
+2020-02-10 Simon Fraser <simon.fra...@apple.com>
+ WebContent jetsams on Sony lens webpage due to spike of IOSurfaces
+ https://bugs.webkit.org/show_bug.cgi?id=207493
+ rdar://problem/59020443
+
+ Reviewed by Zalan Bujtas.
+
+ There were three issues that contributed to massive backing store allocation on
+ <https://www.sony.com/electronics/lenses/t/camera-lenses>.
+
+ The first, fixed in r256095, was that the Web Animations code unioned the untransitioning
+ bounds with the transitioning bounds, causing the computation of large extent rects.
+
+ The second, fixed in r256181, was that GraphicsLayerCA would keep hold of a transform
+ animation for an extra frame, causing a rendering update where
+ RenderLayerBacking::updateGeometry() would have cleared the extent, but GraphicsLayerCA
+ still thought transform was animating, causing GraphicsLayerCA::updateCoverage() to keep
+ backing store attached.
+
+ This patch is the final fix; when animations start and end, we need to ensure that
+ RenderLayerBacking::updateGeometry() is called so that we compute the animation extent in
+ the same frame that adds the animation.
+
+ Test: compositing/backing/transition-extent.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::startAnimation):
+ (WebCore::RenderLayerBacking::animationFinished):
+
+
2020-02-08 Zalan Bujtas <za...@apple.com>
[LFC][BFC] Replace "estimated" term with "precomputed"
Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/rendering/RenderLayerBacking.cpp (257308 => 257309)
--- releases/WebKitGTK/webkit-2.28/Source/WebCore/rendering/RenderLayerBacking.cpp 2020-02-25 15:59:14 UTC (rev 257308)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/rendering/RenderLayerBacking.cpp 2020-02-25 15:59:21 UTC (rev 257309)
@@ -3283,8 +3283,10 @@
didAnimate = true;
#endif
- if (didAnimate)
+ if (didAnimate) {
m_owningLayer.setNeedsPostLayoutCompositingUpdate();
+ m_owningLayer.setNeedsCompositingGeometryUpdate();
+ }
return didAnimate;
}
@@ -3303,6 +3305,7 @@
{
m_graphicsLayer->removeAnimation(animationName);
m_owningLayer.setNeedsPostLayoutCompositingUpdate();
+ m_owningLayer.setNeedsCompositingGeometryUpdate();
}
bool RenderLayerBacking::startTransition(double timeOffset, CSSPropertyID property, const RenderStyle* fromStyle, const RenderStyle* toStyle)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes