Changeset 140237 in webkit


Ignore:
Timestamp:
Jan 18, 2013 11:15:42 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[Mac] Remove unused pageScaleFactor and positionRelativeToBase arguments in GraphicsLayerCA.
https://bugs.webkit.org/show_bug.cgi?id=107357

Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-18
Reviewed by Ryosuke Niwa.

Several methods in GraphicsLayerCA receive a pageScaleFactor or a
positionRelativeToBase argument but don't use the arguments, so this patch
removes them.

No new tests. This is just a refactoring of the existing code.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateGeometry):
(WebCore::GraphicsLayerCA::updateStructuralLayer):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::updateLayerDrawsContent):
(WebCore::GraphicsLayerCA::updateContentsScale):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):

  • platform/graphics/ca/GraphicsLayerCA.h:

(GraphicsLayerCA):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r140235 r140237  
     12013-01-18  Huang Dongsung  <luxtella@company100.net>
     2
     3        [Mac] Remove unused pageScaleFactor and positionRelativeToBase arguments in GraphicsLayerCA.
     4        https://bugs.webkit.org/show_bug.cgi?id=107357
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Several methods in GraphicsLayerCA receive a pageScaleFactor or a
     9        positionRelativeToBase argument but don't use the arguments, so this patch
     10        removes them.
     11
     12        No new tests. This is just a refactoring of the existing code.
     13
     14        * platform/graphics/ca/GraphicsLayerCA.cpp:
     15        (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
     16        (WebCore::GraphicsLayerCA::updateGeometry):
     17        (WebCore::GraphicsLayerCA::updateStructuralLayer):
     18        (WebCore::GraphicsLayerCA::ensureStructuralLayer):
     19        (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
     20        (WebCore::GraphicsLayerCA::updateContentsScale):
     21        (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
     22        * platform/graphics/ca/GraphicsLayerCA.h:
     23        (GraphicsLayerCA):
     24
    1252013-01-18  Dimitri Glazkov  <dglazkov@chromium.org>
    226
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r139903 r140237  
    10661066    // Need to handle Preserves3DChanged first, because it affects which layers subsequent properties are applied to
    10671067    if (m_uncommittedChanges & (Preserves3DChanged | ReplicatedLayerChanged))
    1068         updateStructuralLayer(pageScaleFactor, positionRelativeToBase);
     1068        updateStructuralLayer();
    10691069
    10701070    if (m_uncommittedChanges & GeometryChanged)
     
    10721072
    10731073    if (m_uncommittedChanges & DrawsContentChanged)
    1074         updateLayerDrawsContent(pageScaleFactor, positionRelativeToBase);
     1074        updateLayerDrawsContent(pageScaleFactor);
    10751075
    10761076    if (m_uncommittedChanges & NameChanged)
     
    11241124    // so make sure to update the contents scale before updating the dirty rects.
    11251125    if (m_uncommittedChanges & ContentsScaleChanged)
    1126         updateContentsScale(pageScaleFactor, positionRelativeToBase);
     1126        updateContentsScale(pageScaleFactor);
    11271127
    11281128    if (m_uncommittedChanges & VisibleRectChanged)
     
    12381238    bool needTiledLayer = requiresTiledLayer(pageScaleFactor);
    12391239    if (needTiledLayer != m_usingTiledLayer)
    1240         swapFromOrToTiledLayer(needTiledLayer, pageScaleFactor, positionRelativeToBase);
     1240        swapFromOrToTiledLayer(needTiledLayer);
    12411241
    12421242    FloatSize usedSize = m_usingTiledLayer ? constrainedSize() : scaledSize;
     
    14071407#endif
    14081408
    1409 void GraphicsLayerCA::updateStructuralLayer(float pageScaleFactor, const FloatPoint& positionRelativeToBase)
    1410 {
    1411     ensureStructuralLayer(structuralLayerPurpose(), pageScaleFactor, positionRelativeToBase);
    1412 }
    1413 
    1414 void GraphicsLayerCA::ensureStructuralLayer(StructuralLayerPurpose purpose, float /*pageScaleFactor*/, const FloatPoint& /*positionRelativeToBase*/)
     1409void GraphicsLayerCA::updateStructuralLayer()
     1410{
     1411    ensureStructuralLayer(structuralLayerPurpose());
     1412}
     1413
     1414void GraphicsLayerCA::ensureStructuralLayer(StructuralLayerPurpose purpose)
    14151415{
    14161416    const LayerChangeFlags structuralLayerChangeFlags = NameChanged
     
    15061506}
    15071507
    1508 void GraphicsLayerCA::updateLayerDrawsContent(float pageScaleFactor, const FloatPoint& positionRelativeToBase)
     1508void GraphicsLayerCA::updateLayerDrawsContent(float pageScaleFactor)
    15091509{
    15101510    bool needTiledLayer = requiresTiledLayer(pageScaleFactor);
    15111511    if (needTiledLayer != m_usingTiledLayer)
    1512         swapFromOrToTiledLayer(needTiledLayer, pageScaleFactor, positionRelativeToBase);
     1512        swapFromOrToTiledLayer(needTiledLayer);
    15131513
    15141514    if (m_drawsContent)
     
    24832483}
    24842484
    2485 void GraphicsLayerCA::updateContentsScale(float pageScaleFactor, const FloatPoint& positionRelativeToBase)
     2485void GraphicsLayerCA::updateContentsScale(float pageScaleFactor)
    24862486{
    24872487    bool needTiledLayer = requiresTiledLayer(pageScaleFactor);
    24882488    if (needTiledLayer != m_usingTiledLayer)
    2489         swapFromOrToTiledLayer(needTiledLayer, pageScaleFactor, positionRelativeToBase);
     2489        swapFromOrToTiledLayer(needTiledLayer);
    24902490
    24912491    float contentsScale = clampedContentsScaleForScale(pageScaleFactor * deviceScaleFactor());
     
    26042604}
    26052605
    2606 void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer, float /*pageScaleFactor*/, const FloatPoint& /*positionRelativeToBase*/)
     2606void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer)
    26072607{
    26082608    ASSERT(m_layer->layerType() != PlatformCALayer::LayerTypePageTileCacheLayer);
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

    r137801 r140237  
    222222
    223223    bool requiresTiledLayer(float pageScaleFactor) const;
    224     void swapFromOrToTiledLayer(bool useTiledLayer, float pageScaleFactor, const FloatPoint& positionRelativeToBase);
     224    void swapFromOrToTiledLayer(bool useTiledLayer);
    225225
    226226    CompositingCoordinatesOrientation defaultContentsOrientation() const;
     
    315315    void updateContentsOpaque();
    316316    void updateBackfaceVisibility();
    317     void updateStructuralLayer(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
    318     void updateLayerDrawsContent(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
     317    void updateStructuralLayer();
     318    void updateLayerDrawsContent(float pixelAlignmentScale);
    319319    void updateBackgroundColor();
    320320
     
    332332    void updateDebugBorder();
    333333    void updateVisibleRect(const FloatRect& oldVisibleRect);
    334     void updateContentsScale(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
     334    void updateContentsScale(float pageScaleFactor);
    335335   
    336336    enum StructuralLayerPurpose {
     
    339339        StructuralLayerForReplicaFlattening
    340340    };
    341     void ensureStructuralLayer(StructuralLayerPurpose, float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
     341    void ensureStructuralLayer(StructuralLayerPurpose);
    342342    StructuralLayerPurpose structuralLayerPurpose() const;
    343343
Note: See TracChangeset for help on using the changeset viewer.