Changeset 209865 in webkit


Ignore:
Timestamp:
Dec 15, 2016 10:37:18 AM (7 years ago)
Author:
akling@apple.com
Message:

Always clear RenderLayer backing stores when going into page cache.
<https://webkit.org/b/165901>

Reviewed by Simon Fraser.

Source/WebCore:

We were already doing this for the iOS and GTK+ ports, let's do it everywhere
for consistency, and a bit of memory usage improvement.

This patch just removes the setting and always calls FrameView::clearBackingStores()
when there is composited content going into page cache.

  • history/CachedFrame.cpp:

(WebCore::CachedFrame::CachedFrame):

  • history/PageCache.h:

(WebCore::PageCache::shouldClearBackingStores): Deleted.
(WebCore::PageCache::setShouldClearBackingStores): Deleted.

Source/WebKit/mac:

  • WebView/WebView.mm:

(+[WebView _setCacheModel:]):

Source/WebKit2:

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::WebProcess):

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r209864 r209865  
     12016-12-15  Andreas Kling  <akling@apple.com>
     2
     3        Always clear RenderLayer backing stores when going into page cache.
     4        <https://webkit.org/b/165901>
     5
     6        Reviewed by Simon Fraser.
     7
     8        We were already doing this for the iOS and GTK+ ports, let's do it everywhere
     9        for consistency, and a bit of memory usage improvement.
     10
     11        This patch just removes the setting and always calls FrameView::clearBackingStores()
     12        when there is composited content going into page cache.
     13
     14        * history/CachedFrame.cpp:
     15        (WebCore::CachedFrame::CachedFrame):
     16        * history/PageCache.h:
     17        (WebCore::PageCache::shouldClearBackingStores): Deleted.
     18        (WebCore::PageCache::setShouldClearBackingStores): Deleted.
     19
    1202016-12-15  Darin Adler  <darin@apple.com>
    221
  • trunk/Source/WebCore/history/CachedFrame.cpp

    r208688 r209865  
    165165    frame.loader().client().savePlatformDataToCachedFrame(this);
    166166
    167     if (m_isComposited && PageCache::singleton().shouldClearBackingStores())
     167    if (m_isComposited)
    168168        frame.view()->clearBackingStores();
    169169
  • trunk/Source/WebCore/history/PageCache.h

    r208646 r209865  
    6767#endif
    6868
    69     bool shouldClearBackingStores() const { return m_shouldClearBackingStores; }
    70     void setShouldClearBackingStores(bool flag) { m_shouldClearBackingStores = flag; }
    71 
    7269private:
    7370    PageCache() = default; // Use singleton() instead.
     
    8077    ListHashSet<RefPtr<HistoryItem>> m_items;
    8178    unsigned m_maxSize {0};
    82     bool m_shouldClearBackingStores {false};
    8379
    8480    friend class WTF::NeverDestroyed<PageCache>;
  • trunk/Source/WebKit/mac/ChangeLog

    r209746 r209865  
     12016-12-15  Andreas Kling  <akling@apple.com>
     2
     3        Always clear RenderLayer backing stores when going into page cache.
     4        <https://webkit.org/b/165901>
     5
     6        Reviewed by Simon Fraser.
     7
     8        * WebView/WebView.mm:
     9        (+[WebView _setCacheModel:]):
     10
    1112016-12-12  Alex Christensen  <achristensen@webkit.org>
    212
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r209733 r209865  
    85218521    pageCache.setMaxSize(pageCacheSize);
    85228522#if PLATFORM(IOS)
    8523     pageCache.setShouldClearBackingStores(true);
    85248523    nsurlCacheMemoryCapacity = std::max(nsurlCacheMemoryCapacity, [nsurlCache memoryCapacity]);
    85258524    CFURLCacheRef cfCache;
  • trunk/Source/WebKit2/ChangeLog

    r209864 r209865  
     12016-12-15  Andreas Kling  <akling@apple.com>
     2
     3        Always clear RenderLayer backing stores when going into page cache.
     4        <https://webkit.org/b/165901>
     5
     6        Reviewed by Simon Fraser.
     7
     8        * WebProcess/WebProcess.cpp:
     9        (WebKit::WebProcess::WebProcess):
     10
    1112016-12-15  Darin Adler  <darin@apple.com>
    212
  • trunk/Source/WebKit2/WebProcess/WebProcess.cpp

    r209840 r209865  
    204204#endif
    205205
    206 #if PLATFORM(IOS) || PLATFORM(GTK)
    207     PageCache::singleton().setShouldClearBackingStores(true);
    208 #endif
    209 
    210206    ResourceLoadObserver::sharedObserver().setStatisticsStore(m_resourceLoadStatisticsStorage.copyRef());
    211207    m_resourceLoadStatisticsStorage->setNotificationCallback([this] {
Note: See TracChangeset for help on using the changeset viewer.