Changeset 183302 in webkit


Ignore:
Timestamp:
Apr 24, 2015, 6:03:03 PM (10 years ago)
Author:
Simon Fraser
Message:

Have the web inspector report accurate memory use for layers with detached backing store
https://bugs.webkit.org/show_bug.cgi?id=144179

Reviewed by Dean Jackson.
Source/WebCore:

Only report memory use for layers whose backing store is attached.

  • platform/graphics/ca/GraphicsLayerCA.cpp:
  • platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()

which platforms can override if they allow backing store detaching.

Source/WebKit2:

Remote layers can make their backing store volatile, so the backing only contributes
to reported memory use when attached.

  • WebProcess/WebPage/mac/PlatformCALayerRemote.h:
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r183300 r183302  
     12015-04-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Have the web inspector report accurate memory use for layers with detached backing store
     4        https://bugs.webkit.org/show_bug.cgi?id=144179
     5
     6        Reviewed by Dean Jackson.
     7
     8        Only report memory use for layers whose backing store is attached.
     9
     10        * platform/graphics/ca/GraphicsLayerCA.cpp:
     11        * platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()
     12        which platforms can override if they allow backing store detaching.
     13
    1142015-04-24  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r183300 r183302  
    36783678        return tiledBacking->retainedTileBackingStoreMemory();
    36793679
     3680    if (!m_layer->backingContributesToMemoryEstimate())
     3681        return 0;
     3682
    36803683    return 4.0 * size().width() * m_layer->contentsScale() * size().height() * m_layer->contentsScale();
    36813684}
  • trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h

    r183242 r183302  
    179179    virtual void setBackingStoreAttached(bool) = 0;
    180180    virtual bool backingStoreAttached() const = 0;
     181    virtual bool backingContributesToMemoryEstimate() const { return true; }
    181182
    182183    virtual void setMinificationFilter(FilterType) = 0;
  • trunk/Source/WebKit2/ChangeLog

    r183299 r183302  
     12015-04-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Have the web inspector report accurate memory use for layers with detached backing store
     4        https://bugs.webkit.org/show_bug.cgi?id=144179
     5
     6        Reviewed by Dean Jackson.
     7       
     8        Remote layers can make their backing store volatile, so the backing only contributes
     9        to reported memory use when attached.
     10
     11        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
     12
    1132015-04-24  Andreas Kling  <akling@apple.com>
    214
  • trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h

    r183242 r183302  
    9797    virtual void setBackingStoreAttached(bool) override;
    9898    virtual bool backingStoreAttached() const override;
     99    virtual bool backingContributesToMemoryEstimate() const override { return backingStoreAttached(); }
    99100
    100101    virtual void setGeometryFlipped(bool) override;
Note: See TracChangeset for help on using the changeset viewer.