⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 236974 in webkit


Ignore:
Timestamp:
Oct 9, 2018, 12:23:21 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

[CoordGraphics] Remove the 'previous backing store' logic
https://bugs.webkit.org/show_bug.cgi?id=188838

Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2018-10-09
Reviewed by Žan Doberšek.

Remove previousBackingStore from LayerState, since it's not needed anymore.
When there is scale adjustment, we now simply discard mainBackingStore and
recreate a new one.

No new tests required.

  • platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r236971 r236974  
     12018-10-09  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
     2
     3        [CoordGraphics] Remove the 'previous backing store' logic
     4        https://bugs.webkit.org/show_bug.cgi?id=188838
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Remove previousBackingStore from LayerState, since it's not needed anymore.
     9        When there is scale adjustment, we now simply discard mainBackingStore and
     10        recreate a new one.
     11
     12        No new tests required.
     13
     14        * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h:
     15        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
     16        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
     17        (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
     18        (WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
     19
    1202018-10-09  Antti Koivisto  <antti@apple.com>
    221
  • trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h

    r234883 r236974  
    8686
    8787        std::unique_ptr<WebCore::TiledBackingStore> mainBackingStore;
    88         std::unique_ptr<WebCore::TiledBackingStore> previousBackingStore;
    8988
    9089        TileUpdate update;
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp

    r236794 r236974  
    648648        layerState.isPurging = true;
    649649        layerState.mainBackingStore = nullptr;
    650         layerState.previousBackingStore = nullptr;
    651650
    652651        m_nicosia.backingStore = nullptr;
     
    868867
    869868    // Address the content scale adjustment.
    870     // FIXME: the previousBackingStore logic is likely possible to remove.
    871     // https://bugs.webkit.org/show_bug.cgi?id=188693
    872869    if (m_pendingContentsScaleAdjustment) {
    873870        if (layerState.mainBackingStore && layerState.mainBackingStore->contentsScale() != effectiveContentsScale()) {
    874             // Between creating the new backing store and painting the content, we do not
    875             // want to drop the previous one as that might result in briefly seeing flickering
    876             // as the old tiles may be dropped before something replaces them.
    877             layerState.previousBackingStore = WTFMove(layerState.mainBackingStore);
    878 
    879             // No reason to save the previous backing store for non-visible areas.
    880             layerState.previousBackingStore->removeAllNonVisibleTiles(transformedVisibleRect(), IntRect(0, 0, size().width(), size().height()));
     871            // Discard the TiledBackingStore object to reconstruct it with new content scale.
     872            layerState.mainBackingStore = nullptr;
    881873        }
    882874        m_pendingContentsScaleAdjustment = false;
     
    943935            didUpdateTileBuffers();
    944936    }
    945 
    946     // The previous backing store is kept around to avoid flickering between
    947     // removing the existing tiles and painting the new ones. The first time
    948     // the visibleRect is full painted we remove the previous backing store.
    949     if (layerState.previousBackingStore && layerState.mainBackingStore->visibleAreaIsCovered())
    950         layerState.previousBackingStore = nullptr;
    951937
    952938    // Request a second update immediately if some tiles are still pending creation.
     
    968954        layerState.isPurging = true;
    969955        layerState.mainBackingStore = nullptr;
    970         layerState.previousBackingStore = nullptr;
    971956
    972957        m_nicosia.backingStore = nullptr;
Note: See TracChangeset for help on using the changeset viewer.