Changeset 86524 in webkit


Ignore:
Timestamp:
May 15, 2011 10:31:12 PM (13 years ago)
Author:
msaboff@apple.com
Message:

2011-05-15 Michael Saboff <msaboff@apple.com>

Reviewed by Geoffrey Garen.

Suboptimal lifetime of BackingStore objects in DrawingAreaProxyImpl
https://bugs.webkit.org/show_bug.cgi?id=60864

Implemented reuse of BackingStore's in
DrawingAreaProxyImpl::didUpdateBackingStoreState when the size needed
matches the size of the existing BackingStore.
Also reduced the discardBackingStoreTimer from 5 to 2 seconds.
These changes reduces memory usage up to 10MB on memory tests.

  • UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r86522 r86524  
     12011-05-15  Michael Saboff  <msaboff@apple.com>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        Suboptimal lifetime of BackingStore objects in DrawingAreaProxyImpl
     6        https://bugs.webkit.org/show_bug.cgi?id=60864
     7
     8        Implemented reuse of BackingStore's in
     9        DrawingAreaProxyImpl::didUpdateBackingStoreState when the size needed
     10        matches the size of the existing BackingStore.
     11        Also reduced the discardBackingStoreTimer from 5 to 2 seconds.
     12        These changes reduces memory usage up to 10MB on memory tests.
     13
     14        * UIProcess/DrawingAreaProxyImpl.cpp:
     15        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
     16        (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
     17
    1182011-05-15  Anders Carlsson  <andersca@apple.com>
    219
  • trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp

    r86495 r86524  
    215215#endif
    216216
    217     // FIXME: We could just reuse our existing backing store if it's the same size as
    218     // updateInfo.viewSize.
    219     m_backingStore = nullptr;
     217    // If we have a backing store the right size, reuse it.
     218    if (m_backingStore && m_backingStore->size() != updateInfo.viewSize)
     219        m_backingStore = nullptr;
    220220    incorporateUpdate(updateInfo);
    221221}
     
    358358    // We'll wait this many seconds after the last paint before throwing away our backing store to save memory.
    359359    // FIXME: It would be smarter to make this delay based on how expensive painting is. See <http://webkit.org/b/55733>.
    360     static const double discardBackingStoreDelay = 5;
     360    static const double discardBackingStoreDelay = 2;
    361361
    362362    m_discardBackingStoreTimer.startOneShot(discardBackingStoreDelay);
Note: See TracChangeset for help on using the changeset viewer.