Changeset 152213 in webkit


Ignore:
Timestamp:
Jun 29, 2013 1:22:19 PM (11 years ago)
Author:
Simon Fraser
Message:

Avoid calling isSimpleContainerCompositingLayer() an extra time
https://bugs.webkit.org/show_bug.cgi?id=118218

Reviewed by Tim Horton.

containsPaintedContent() called isSimpleContainerCompositingLayer(), which
is not particularly cheap. But the caller already has this information,
so pass it in.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::containsPaintedContent):

  • rendering/RenderLayerBacking.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r152212 r152213  
     12013-06-29  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Avoid calling isSimpleContainerCompositingLayer() an extra time
     4        https://bugs.webkit.org/show_bug.cgi?id=118218
     5
     6        Reviewed by Tim Horton.
     7
     8        containsPaintedContent() called isSimpleContainerCompositingLayer(), which
     9        is not particularly cheap. But the caller already has this information,
     10        so pass it in.
     11
     12        * rendering/RenderLayerBacking.cpp:
     13        (WebCore::RenderLayerBacking::updateDrawsContent):
     14        (WebCore::RenderLayerBacking::containsPaintedContent):
     15        * rendering/RenderLayerBacking.h:
     16
    1172013-06-29  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r151707 r152213  
    980980    }
    981981
    982     bool hasPaintedContent = !isSimpleContainer && containsPaintedContent();
     982    bool hasPaintedContent = containsPaintedContent(isSimpleContainer);
    983983
    984984    // FIXME: we could refine this to only allocate backing for one of these layers if possible.
     
    16531653}
    16541654
    1655 bool RenderLayerBacking::containsPaintedContent() const
    1656 {
    1657     if (isSimpleContainerCompositingLayer() || paintsIntoWindow() || paintsIntoCompositedAncestor() || m_artificiallyInflatedBounds || m_owningLayer->isReflection())
     1655bool RenderLayerBacking::containsPaintedContent(bool isSimpleContainer) const
     1656{
     1657    if (isSimpleContainer || paintsIntoWindow() || paintsIntoCompositedAncestor() || m_artificiallyInflatedBounds || m_owningLayer->isReflection())
    16581658        return false;
    16591659
  • trunk/Source/WebCore/rendering/RenderLayerBacking.h

    r148921 r152213  
    255255    bool isSimpleContainerCompositingLayer() const;
    256256    // Returns true if this layer has content that needs to be rendered by painting into the backing store.
    257     bool containsPaintedContent() const;
     257    bool containsPaintedContent(bool isSimpleContainer) const;
    258258    // Returns true if the RenderLayer just contains an image that we can composite directly.
    259259    bool isDirectlyCompositedImage() const;
Note: See TracChangeset for help on using the changeset viewer.