Changeset 140053 in webkit


Ignore:
Timestamp:
Jan 17, 2013 2:55:06 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Coordinated Graphics: Remove redundant behaviors in LayerTreeRenderer.
https://bugs.webkit.org/show_bug.cgi?id=107084

Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-17
Reviewed by Noam Rosenthal.

There are two changes.

  1. It is redundant to call GraphicsLayer::removeFromParent() or

GraphicsLayer::removeAllChildren() before deleting GraphicsLayer, because the
destructor of GraphicsLayerTextureMapper removes a parent and all children.

  1. LayerTreeRenderer::setRootLayerID() does not need to remove all children of

rootLayer because this method can be called only once.

  • UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:

(WebKit::LayerTreeRenderer::deleteLayer):
(WebKit::LayerTreeRenderer::setRootLayerID):
(WebKit::LayerTreeRenderer::purgeGLResources):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r140044 r140053  
     12013-01-17  Huang Dongsung  <luxtella@company100.net>
     2
     3        Coordinated Graphics: Remove redundant behaviors in LayerTreeRenderer.
     4        https://bugs.webkit.org/show_bug.cgi?id=107084
     5
     6        Reviewed by Noam Rosenthal.
     7
     8        There are two changes.
     9        1. It is redundant to call GraphicsLayer::removeFromParent() or
     10        GraphicsLayer::removeAllChildren() before deleting GraphicsLayer, because the
     11        destructor of GraphicsLayerTextureMapper removes a parent and all children.
     12        2. LayerTreeRenderer::setRootLayerID() does not need to remove all children of
     13        rootLayer because this method can be called only once.
     14
     15        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
     16        (WebKit::LayerTreeRenderer::deleteLayer):
     17        (WebKit::LayerTreeRenderer::setRootLayerID):
     18        (WebKit::LayerTreeRenderer::purgeGLResources):
     19
    1202013-01-17  Timothy Hatcher  <timothy@apple.com>
    221
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp

    r138468 r140053  
    366366    ASSERT(layer);
    367367
    368     layer->removeFromParent();
    369368    m_pendingSyncBackingStores.remove(toTextureMapperLayer(layer.get()));
    370369    m_fixedLayers.remove(layerID);
     
    380379
    381380    m_rootLayerID = layerID;
    382     m_rootLayer->removeAllChildren();
    383381
    384382    GraphicsLayer* layer = layerByID(layerID);
     383    ASSERT(m_rootLayer->children().isEmpty());
    385384    m_rootLayer->addChild(layer);
    386385}
     
    636635#endif
    637636
    638     m_rootLayer->removeAllChildren();
    639637    m_rootLayer.clear();
    640638    m_rootLayerID = InvalidCoordinatedLayerID;
Note: See TracChangeset for help on using the changeset viewer.