Changeset 230950 in webkit
- Timestamp:
- Apr 24, 2018 1:15:41 AM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r230948 r230950 1 2018-04-24 Zan Dobersek <zdobersek@igalia.com> 2 3 [CoordGraphics] Avoid painting backing stores for zero-opacity layers 4 https://bugs.webkit.org/show_bug.cgi?id=184143 5 6 Reviewed by Carlos Garcia Campos. 7 8 Skip generating backing stores for layers that have zero opacity and do 9 not animate the opacity value. In the current CoordinatedGraphics system 10 this can end up saving loads of memory on Web content that deploys a 11 large number of such elements. 12 13 * platform/graphics/texmap/TextureMapperLayer.h: 14 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: 15 (WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore const): 16 1 17 2018-04-24 Daniel Bates <dabates@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h
r230906 r230950 88 88 void setContentsLayer(TextureMapperPlatformLayer*); 89 89 void setAnimations(const TextureMapperAnimations&); 90 const TextureMapperAnimations& animations() const { return m_animations; } 90 91 void setFixedToViewport(bool); 91 92 bool fixedToViewport() const { return m_fixedToViewport; } -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
r230913 r230950 1099 1099 bool CoordinatedGraphicsLayer::shouldHaveBackingStore() const 1100 1100 { 1101 return drawsContent() && contentsAreVisible() && !m_size.isEmpty(); 1101 return drawsContent() && contentsAreVisible() && !m_size.isEmpty() 1102 && (!!opacity() || m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity)); 1102 1103 } 1103 1104 -
trunk/Source/WebKit/ChangeLog
r230945 r230950 1 2018-04-24 Zan Dobersek <zdobersek@igalia.com> 2 3 [CoordGraphics] Avoid painting backing stores for zero-opacity layers 4 https://bugs.webkit.org/show_bug.cgi?id=184143 5 6 Reviewed by Carlos Garcia Campos. 7 8 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: 9 (WebKit::layerShouldHaveBackingStore): 10 Mirror CoordinatedGraphicsLayer's backing store requirements. 11 1 12 2018-04-23 Daniel Bates <dabates@apple.com> 2 13 -
trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
r230906 r230950 38 38 static bool layerShouldHaveBackingStore(TextureMapperLayer* layer) 39 39 { 40 return layer->drawsContent() && layer->contentsAreVisible() && !layer->size().isEmpty(); 40 return layer->drawsContent() && layer->contentsAreVisible() && !layer->size().isEmpty() 41 && (!!layer->opacity() || layer->animations().hasActiveAnimationsOfType(AnimatedPropertyOpacity)); 41 42 } 42 43
Note: See TracChangeset
for help on using the changeset viewer.