Title: [231425] releases/WebKitGTK/webkit-2.20/Source
- Revision
- 231425
- Author
- [email protected]
- Date
- 2018-05-07 02:18:04 -0700 (Mon, 07 May 2018)
Log Message
Merge r230950 - [CoordGraphics] Avoid painting backing stores for zero-opacity layers
https://bugs.webkit.org/show_bug.cgi?id=184143
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Skip generating backing stores for layers that have zero opacity and do
not animate the opacity value. In the current CoordinatedGraphics system
this can end up saving loads of memory on Web content that deploys a
large number of such elements.
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore const):
Source/WebKit:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::layerShouldHaveBackingStore):
Mirror CoordinatedGraphicsLayer's backing store requirements.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog (231424 => 231425)
--- releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog 2018-05-07 09:17:56 UTC (rev 231424)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog 2018-05-07 09:18:04 UTC (rev 231425)
@@ -1,3 +1,19 @@
+2018-04-24 Zan Dobersek <[email protected]>
+
+ [CoordGraphics] Avoid painting backing stores for zero-opacity layers
+ https://bugs.webkit.org/show_bug.cgi?id=184143
+
+ Reviewed by Carlos Garcia Campos.
+
+ Skip generating backing stores for layers that have zero opacity and do
+ not animate the opacity value. In the current CoordinatedGraphics system
+ this can end up saving loads of memory on Web content that deploys a
+ large number of such elements.
+
+ * platform/graphics/texmap/TextureMapperLayer.h:
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore const):
+
2018-04-23 Antti Koivisto <[email protected]>
REGRESSION (r220112): reCAPTCHA images render off screen on Twitch.tv app Log In or Sign Up
Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h (231424 => 231425)
--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h 2018-05-07 09:17:56 UTC (rev 231424)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h 2018-05-07 09:18:04 UTC (rev 231425)
@@ -115,6 +115,7 @@
void setRepaintCount(int);
void setContentsLayer(TextureMapperPlatformLayer*);
void setAnimations(const TextureMapperAnimations&);
+ const TextureMapperAnimations& animations() const { return m_animations; }
void setFixedToViewport(bool);
bool fixedToViewport() const { return m_fixedToViewport; }
void setBackingStore(RefPtr<TextureMapperBackingStore>&&);
Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (231424 => 231425)
--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2018-05-07 09:17:56 UTC (rev 231424)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2018-05-07 09:18:04 UTC (rev 231425)
@@ -1108,7 +1108,8 @@
bool CoordinatedGraphicsLayer::shouldHaveBackingStore() const
{
- return drawsContent() && contentsAreVisible() && !m_size.isEmpty();
+ return drawsContent() && contentsAreVisible() && !m_size.isEmpty()
+ && (!!opacity() || m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity));
}
bool CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation() const
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog (231424 => 231425)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog 2018-05-07 09:17:56 UTC (rev 231424)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/ChangeLog 2018-05-07 09:18:04 UTC (rev 231425)
@@ -1,3 +1,14 @@
+2018-04-24 Zan Dobersek <[email protected]>
+
+ [CoordGraphics] Avoid painting backing stores for zero-opacity layers
+ https://bugs.webkit.org/show_bug.cgi?id=184143
+
+ Reviewed by Carlos Garcia Campos.
+
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
+ (WebKit::layerShouldHaveBackingStore):
+ Mirror CoordinatedGraphicsLayer's backing store requirements.
+
2018-04-20 Carlos Garcia Campos <[email protected]>
[SOUP] Do TLS error checking on GTlsConnection::accept-certificate
Modified: releases/WebKitGTK/webkit-2.20/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp (231424 => 231425)
--- releases/WebKitGTK/webkit-2.20/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp 2018-05-07 09:17:56 UTC (rev 231424)
+++ releases/WebKitGTK/webkit-2.20/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp 2018-05-07 09:18:04 UTC (rev 231425)
@@ -61,7 +61,8 @@
static bool layerShouldHaveBackingStore(TextureMapperLayer* layer)
{
- return layer->drawsContent() && layer->contentsAreVisible() && !layer->size().isEmpty();
+ return layer->drawsContent() && layer->contentsAreVisible() && !layer->size().isEmpty()
+ && (!!layer->opacity() || layer->animations().hasActiveAnimationsOfType(AnimatedPropertyOpacity));
}
CoordinatedGraphicsScene::CoordinatedGraphicsScene(CoordinatedGraphicsSceneClient* client)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes