Changeset 183196 in webkit


Ignore:
Timestamp:
Apr 23, 2015 10:59:58 AM (9 years ago)
Author:
Simon Fraser
Message:

Remove m_isPageTiledBackingLayer data member from GraphicsLayerCA, just use the layer type instead
https://bugs.webkit.org/show_bug.cgi?id=144108

Reviewed by Dean Jackson.

No need for the m_isPageTiledBackingLayer data member. We can just check the layer
type instead.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::initialize):
(WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
(WebCore::GraphicsLayerCA::updateContentsScale):
(WebCore::GraphicsLayerCA::getDebugBorderInfo):
(WebCore::GraphicsLayerCA::requiresTiledLayer):

  • platform/graphics/ca/GraphicsLayerCA.h:

(WebCore::GraphicsLayerCA::isPageTiledBackingLayer):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r183195 r183196  
     12015-04-23  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Remove m_isPageTiledBackingLayer data member from GraphicsLayerCA, just use the layer type instead
     4        https://bugs.webkit.org/show_bug.cgi?id=144108
     5
     6        Reviewed by Dean Jackson.
     7
     8        No need for the m_isPageTiledBackingLayer data member. We can just check the layer
     9        type instead.
     10
     11        * platform/graphics/ca/GraphicsLayerCA.cpp:
     12        (WebCore::GraphicsLayerCA::GraphicsLayerCA):
     13        (WebCore::GraphicsLayerCA::initialize):
     14        (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
     15        (WebCore::GraphicsLayerCA::updateContentsScale):
     16        (WebCore::GraphicsLayerCA::getDebugBorderInfo):
     17        (WebCore::GraphicsLayerCA::requiresTiledLayer):
     18        * platform/graphics/ca/GraphicsLayerCA.h:
     19        (WebCore::GraphicsLayerCA::isPageTiledBackingLayer):
     20
    1212015-04-23  Brady Eidson  <beidson@apple.com>
    222
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r181832 r183196  
    353353    : GraphicsLayer(layerType, client)
    354354    , m_contentsLayerPurpose(NoContentsLayer)
    355     , m_isPageTiledBackingLayer(false)
    356355    , m_needsFullRepaint(false)
    357356    , m_usingBackdropLayerType(false)
     
    363362void GraphicsLayerCA::initialize(Type layerType)
    364363{
    365     if (layerType == Type::PageTiledBacking)
    366         m_isPageTiledBackingLayer = true;
    367 
    368364    PlatformCALayer::LayerType platformLayerType;
    369365    switch (layerType) {
     
    13131309    // The repaint counters are painted into the TileController tiles (which have no corresponding platform layer),
    13141310    // so we don't want to overpaint the repaint counter when called with the TileController's own layer.
    1315     if (m_isPageTiledBackingLayer && platformLayer)
     1311    if (isPageTiledBackingLayer() && platformLayer)
    13161312        return false;
    13171313
     
    30703066    float contentsScale = pageScaleFactor * deviceScaleFactor();
    30713067
    3072     if (m_isPageTiledBackingLayer && tiledBacking()) {
     3068    if (isPageTiledBackingLayer() && tiledBacking()) {
    30733069        float zoomedOutScale = m_client.zoomedOutPageScaleFactor() * deviceScaleFactor();
    30743070        tiledBacking()->setZoomedOutContentsScale(zoomedOutScale);
     
    30853081    if (tiledBacking()) {
    30863082        // Scale change may swap in a different set of tiles changing the custom child layers.
    3087         if (m_isPageTiledBackingLayer)
     3083        if (isPageTiledBackingLayer())
    30883084            m_uncommittedChanges |= ChildrenChanged;
    30893085        // Tiled backing repaints automatically on scale change.
     
    31283124void GraphicsLayerCA::getDebugBorderInfo(Color& color, float& width) const
    31293125{
    3130     if (m_isPageTiledBackingLayer) {
     3126    if (isPageTiledBackingLayer()) {
    31313127        color = Color(0, 0, 128, 128); // tile cache layer: dark blue
    31323128        width = 0.5;
     
    32063202bool GraphicsLayerCA::requiresTiledLayer(float pageScaleFactor) const
    32073203{
    3208     if (!m_drawsContent || m_isPageTiledBackingLayer)
     3204    if (!m_drawsContent || isPageTiledBackingLayer())
    32093205        return false;
    32103206
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

    r180965 r183196  
    268268    WEBCORE_EXPORT virtual void setReplicatedByLayer(GraphicsLayer*) override;
    269269
     270    WEBCORE_EXPORT virtual bool canThrottleLayerFlush() const override;
     271
    270272    WEBCORE_EXPORT virtual void getDebugBorderInfo(Color&, float& width) const override;
    271273    WEBCORE_EXPORT virtual void dumpAdditionalProperties(TextStream&, int indent, LayerTreeAsTextBehavior) const override;
     
    284286
    285287    bool recursiveVisibleRectChangeRequiresFlush(const TransformState&) const;
    286 
    287     WEBCORE_EXPORT virtual bool canThrottleLayerFlush() const override;
     288   
     289    bool isPageTiledBackingLayer() const { return type() == Type::PageTiledBacking; }
    288290
    289291    // Used to track the path down the tree for replica layers.
     
    492494   
    493495    ContentsLayerPurpose m_contentsLayerPurpose;
    494     bool m_isPageTiledBackingLayer : 1;
    495496    bool m_needsFullRepaint : 1;
    496497    bool m_usingBackdropLayerType : 1;
Note: See TracChangeset for help on using the changeset viewer.