Changeset 251837 in webkit
- Timestamp:
- Oct 31, 2019 2:31:14 AM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r251836 r251837 1 2019-10-31 Miguel Gomez <magomez@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 Žan Doberšek. 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 Based on a previous patch from Žan Doberšek. 14 15 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: 16 (WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore const): 17 1 18 2019-10-29 Carlos Garcia Campos <cgarcia@igalia.com> 2 19 -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
r250554 r251837 1240 1240 bool CoordinatedGraphicsLayer::shouldHaveBackingStore() const 1241 1241 { 1242 return drawsContent() && contentsAreVisible() && !m_size.isEmpty(); 1242 return drawsContent() && contentsAreVisible() && !m_size.isEmpty() 1243 && (!!opacity() || m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity)); 1243 1244 } 1244 1245 -
trunk/Source/WebKit/ChangeLog
r251834 r251837 1 2019-10-31 Miguel Gomez <magomez@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 Žan Doberšek. 7 8 Do not check whether a backingStore is required by a layer inside CoordinatedGraphicsScene. This 9 decision is made by the appropriate CoordinatedGraphicsLayer and propagated to the scene by 10 sending a valid or null Nicosia::BackingStore instance through the state. 11 12 * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: 13 (WebKit::updateBackingStore): 14 (WebKit::layerShouldHaveBackingStore): Deleted. 15 1 16 2019-10-30 Peng Liu <peng.liu6@apple.com> 2 17 -
trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
r250418 r251837 41 41 using namespace WebCore; 42 42 43 static bool layerShouldHaveBackingStore(TextureMapperLayer* layer)44 {45 return layer->drawsContent() && layer->contentsAreVisible() && !layer->size().isEmpty();46 }47 48 43 CoordinatedGraphicsScene::CoordinatedGraphicsScene(CoordinatedGraphicsSceneClient* client) 49 44 : m_client(client) … … 136 131 const Nicosia::BackingStoreTextureMapperImpl::TileUpdate& update) 137 132 { 138 if (!layerShouldHaveBackingStore(&layer)) {139 layer.setBackingStore(nullptr);140 compositionState.backingStore = nullptr;141 return;142 }143 144 133 if (!compositionState.backingStore) 145 134 compositionState.backingStore = CoordinatedBackingStore::create();
Note: See TracChangeset
for help on using the changeset viewer.