Changeset 213429 in webkit


Ignore:
Timestamp:
Mar 4, 2017, 1:49:30 PM (8 years ago)
Author:
Simon Fraser
Message:

Clarify some terminology in RenderLayerBacking
https://bugs.webkit.org/show_bug.cgi?id=169174

Reviewed by Zalan Bujtas.

Rename some functions related to directly-composited background images and
box decorations for clarify.

Only behavior change is for canDirectlyCompositeBackgroundBackgroundImage() to check
GraphicsLayer::supportsContentsTiling(), which means that RenderLayerBacking::contentChanged()
will no longer trigger a updateGeometry() when it gets BackgroundImageChanged on non-
CoordinateGraphics platforms.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateAfterDescendants):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBoxDecorations):
(WebCore::canDirectlyCompositeBackgroundBackgroundImage):
(WebCore::hasPaintedBoxDecorationsOrBackgroundImage):
(WebCore::supportsDirectlyCompositedBoxDecorations):
(WebCore::RenderLayerBacking::paintsBoxDecorations):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::contentChanged):
(WebCore::RenderLayerBacking::updateDirectlyCompositedContents): Deleted.
(WebCore::canCreateTiledImage): Deleted.
(WebCore::hasVisibleBoxDecorationsOrBackgroundImage): Deleted.
(WebCore::supportsDirectBoxDecorationsComposition): Deleted.

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r213424 r213429  
     12017-03-04  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Clarify some terminology in RenderLayerBacking
     4        https://bugs.webkit.org/show_bug.cgi?id=169174
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Rename some functions related to directly-composited background images and
     9        box decorations for clarify.
     10
     11        Only behavior change is for canDirectlyCompositeBackgroundBackgroundImage() to check
     12        GraphicsLayer::supportsContentsTiling(), which means that RenderLayerBacking::contentChanged()
     13        will no longer trigger a updateGeometry() when it gets BackgroundImageChanged on non-
     14        CoordinateGraphics platforms.
     15
     16        * rendering/RenderLayerBacking.cpp:
     17        (WebCore::RenderLayerBacking::updateConfiguration):
     18        (WebCore::RenderLayerBacking::updateAfterDescendants):
     19        (WebCore::RenderLayerBacking::updateDirectlyCompositedBoxDecorations):
     20        (WebCore::canDirectlyCompositeBackgroundBackgroundImage):
     21        (WebCore::hasPaintedBoxDecorationsOrBackgroundImage):
     22        (WebCore::supportsDirectlyCompositedBoxDecorations):
     23        (WebCore::RenderLayerBacking::paintsBoxDecorations):
     24        (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
     25        (WebCore::RenderLayerBacking::contentChanged):
     26        (WebCore::RenderLayerBacking::updateDirectlyCompositedContents): Deleted.
     27        (WebCore::canCreateTiledImage): Deleted.
     28        (WebCore::hasVisibleBoxDecorationsOrBackgroundImage): Deleted.
     29        (WebCore::supportsDirectBoxDecorationsComposition): Deleted.
     30        * rendering/RenderLayerBacking.h:
     31
    1322017-03-04  Alex Christensen  <achristensen@webkit.org>
    233
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r213405 r213429  
    608608        }
    609609    } else
    610         m_graphicsLayer->setReplicatedByLayer(0);
     610        m_graphicsLayer->setReplicatedByLayer(nullptr);
    611611
    612612    if (!m_owningLayer.isRootLayer()) {
    613613        bool isSimpleContainer = isSimpleContainerCompositingLayer();
    614614        bool didUpdateContentsRect = false;
    615         updateDirectlyCompositedContents(isSimpleContainer, didUpdateContentsRect);
     615        updateDirectlyCompositedBoxDecorations(isSimpleContainer, didUpdateContentsRect);
    616616    } else
    617617        updateRootLayerConfiguration();
     
    10981098        // FIXME: this duplicates work we did in updateConfiguration().
    10991099        isSimpleContainer = isSimpleContainerCompositingLayer();
    1100         updateDirectlyCompositedContents(isSimpleContainer, didUpdateContentsRect);
     1100        updateDirectlyCompositedBoxDecorations(isSimpleContainer, didUpdateContentsRect);
    11011101        if (!didUpdateContentsRect && m_graphicsLayer->usesContentsLayer())
    11021102            resetContentsRect();
     
    11821182}
    11831183
    1184 void RenderLayerBacking::updateDirectlyCompositedContents(bool isSimpleContainer, bool& didUpdateContentsRect)
     1184void RenderLayerBacking::updateDirectlyCompositedBoxDecorations(bool isSimpleContainer, bool& didUpdateContentsRect)
    11851185{
    11861186    if (!m_owningLayer.hasVisibleContent())
     
    17111711}
    17121712
    1713 static bool canCreateTiledImage(const RenderStyle& style)
    1714 {
     1713static bool canDirectlyCompositeBackgroundBackgroundImage(const RenderStyle& style)
     1714{
     1715    if (!GraphicsLayer::supportsContentsTiling())
     1716        return false;
     1717
    17151718    auto& fillLayer = style.backgroundLayers();
    17161719    if (fillLayer.next())
     
    17401743}
    17411744
    1742 static bool hasVisibleBoxDecorationsOrBackgroundImage(const RenderStyle& style)
     1745static bool hasPaintedBoxDecorationsOrBackgroundImage(const RenderStyle& style)
    17431746{
    17441747    if (hasVisibleBoxDecorations(style))
     
    17481751        return false;
    17491752
    1750     return !GraphicsLayer::supportsContentsTiling() || !canCreateTiledImage(style);
     1753    return !canDirectlyCompositeBackgroundBackgroundImage(style);
    17511754}
    17521755
     
    18341837}
    18351838
    1836 static bool supportsDirectBoxDecorationsComposition(const RenderLayerModelObject& renderer)
     1839static bool supportsDirectlyCompositedBoxDecorations(const RenderLayerModelObject& renderer)
    18371840{
    18381841    if (!GraphicsLayer::supportsBackgroundColorContent())
     
    18431846        return false;
    18441847
    1845     if (hasVisibleBoxDecorationsOrBackgroundImage(style))
     1848    if (hasPaintedBoxDecorationsOrBackgroundImage(style))
    18461849        return false;
    18471850
     
    18661869        return false;
    18671870
    1868     return !supportsDirectBoxDecorationsComposition(renderer());
     1871    return !supportsDirectlyCompositedBoxDecorations(renderer());
    18691872}
    18701873
     
    19281931        // Reject anything that has a border, a border-radius or outline,
    19291932        // or is not a simple background (no background, or solid color).
    1930         if (hasVisibleBoxDecorationsOrBackgroundImage(rootObject->style()))
     1933        if (hasPaintedBoxDecorationsOrBackgroundImage(rootObject->style()))
    19311934            return false;
    19321935       
     
    19391942            return false;
    19401943       
    1941         if (hasVisibleBoxDecorationsOrBackgroundImage(bodyRenderer->style()))
     1944        if (hasPaintedBoxDecorationsOrBackgroundImage(bodyRenderer->style()))
    19421945            return false;
    19431946    }
     
    20512054    }
    20522055
    2053     if ((changeType == BackgroundImageChanged) && canCreateTiledImage(renderer().style()))
     2056    if ((changeType == BackgroundImageChanged) && canDirectlyCompositeBackgroundBackgroundImage(renderer().style()))
    20542057        updateGeometry();
    20552058
  • trunk/Source/WebCore/rendering/RenderLayerBacking.h

    r213405 r213429  
    322322
    323323    Color rendererBackgroundColor() const;
     324
     325    void updateDirectlyCompositedBoxDecorations(bool isSimpleContainer, bool& didUpdateContentsRect);
    324326    void updateDirectlyCompositedBackgroundColor(bool isSimpleContainer, bool& didUpdateContentsRect);
    325327    void updateDirectlyCompositedBackgroundImage(bool isSimpleContainer, bool& didUpdateContentsRect);
    326     void updateDirectlyCompositedContents(bool isSimpleContainer, bool& didUpdateContentsRect);
    327328
    328329    void resetContentsRect();
Note: See TracChangeset for help on using the changeset viewer.