Changeset 140237 in webkit
- Timestamp:
- Jan 18, 2013 11:15:42 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140235 r140237 1 2013-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 1 25 2013-01-18 Dimitri Glazkov <dglazkov@chromium.org> 2 26 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r139903 r140237 1066 1066 // Need to handle Preserves3DChanged first, because it affects which layers subsequent properties are applied to 1067 1067 if (m_uncommittedChanges & (Preserves3DChanged | ReplicatedLayerChanged)) 1068 updateStructuralLayer( pageScaleFactor, positionRelativeToBase);1068 updateStructuralLayer(); 1069 1069 1070 1070 if (m_uncommittedChanges & GeometryChanged) … … 1072 1072 1073 1073 if (m_uncommittedChanges & DrawsContentChanged) 1074 updateLayerDrawsContent(pageScaleFactor , positionRelativeToBase);1074 updateLayerDrawsContent(pageScaleFactor); 1075 1075 1076 1076 if (m_uncommittedChanges & NameChanged) … … 1124 1124 // so make sure to update the contents scale before updating the dirty rects. 1125 1125 if (m_uncommittedChanges & ContentsScaleChanged) 1126 updateContentsScale(pageScaleFactor , positionRelativeToBase);1126 updateContentsScale(pageScaleFactor); 1127 1127 1128 1128 if (m_uncommittedChanges & VisibleRectChanged) … … 1238 1238 bool needTiledLayer = requiresTiledLayer(pageScaleFactor); 1239 1239 if (needTiledLayer != m_usingTiledLayer) 1240 swapFromOrToTiledLayer(needTiledLayer , pageScaleFactor, positionRelativeToBase);1240 swapFromOrToTiledLayer(needTiledLayer); 1241 1241 1242 1242 FloatSize usedSize = m_usingTiledLayer ? constrainedSize() : scaledSize; … … 1407 1407 #endif 1408 1408 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*/)1409 void GraphicsLayerCA::updateStructuralLayer() 1410 { 1411 ensureStructuralLayer(structuralLayerPurpose()); 1412 } 1413 1414 void GraphicsLayerCA::ensureStructuralLayer(StructuralLayerPurpose purpose) 1415 1415 { 1416 1416 const LayerChangeFlags structuralLayerChangeFlags = NameChanged … … 1506 1506 } 1507 1507 1508 void GraphicsLayerCA::updateLayerDrawsContent(float pageScaleFactor , const FloatPoint& positionRelativeToBase)1508 void GraphicsLayerCA::updateLayerDrawsContent(float pageScaleFactor) 1509 1509 { 1510 1510 bool needTiledLayer = requiresTiledLayer(pageScaleFactor); 1511 1511 if (needTiledLayer != m_usingTiledLayer) 1512 swapFromOrToTiledLayer(needTiledLayer , pageScaleFactor, positionRelativeToBase);1512 swapFromOrToTiledLayer(needTiledLayer); 1513 1513 1514 1514 if (m_drawsContent) … … 2483 2483 } 2484 2484 2485 void GraphicsLayerCA::updateContentsScale(float pageScaleFactor , const FloatPoint& positionRelativeToBase)2485 void GraphicsLayerCA::updateContentsScale(float pageScaleFactor) 2486 2486 { 2487 2487 bool needTiledLayer = requiresTiledLayer(pageScaleFactor); 2488 2488 if (needTiledLayer != m_usingTiledLayer) 2489 swapFromOrToTiledLayer(needTiledLayer , pageScaleFactor, positionRelativeToBase);2489 swapFromOrToTiledLayer(needTiledLayer); 2490 2490 2491 2491 float contentsScale = clampedContentsScaleForScale(pageScaleFactor * deviceScaleFactor()); … … 2604 2604 } 2605 2605 2606 void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer , float /*pageScaleFactor*/, const FloatPoint& /*positionRelativeToBase*/)2606 void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer) 2607 2607 { 2608 2608 ASSERT(m_layer->layerType() != PlatformCALayer::LayerTypePageTileCacheLayer); -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r137801 r140237 222 222 223 223 bool requiresTiledLayer(float pageScaleFactor) const; 224 void swapFromOrToTiledLayer(bool useTiledLayer , float pageScaleFactor, const FloatPoint& positionRelativeToBase);224 void swapFromOrToTiledLayer(bool useTiledLayer); 225 225 226 226 CompositingCoordinatesOrientation defaultContentsOrientation() const; … … 315 315 void updateContentsOpaque(); 316 316 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); 319 319 void updateBackgroundColor(); 320 320 … … 332 332 void updateDebugBorder(); 333 333 void updateVisibleRect(const FloatRect& oldVisibleRect); 334 void updateContentsScale(float p ixelAlignmentScale, const FloatPoint& positionRelativeToBase);334 void updateContentsScale(float pageScaleFactor); 335 335 336 336 enum StructuralLayerPurpose { … … 339 339 StructuralLayerForReplicaFlattening 340 340 }; 341 void ensureStructuralLayer(StructuralLayerPurpose , float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);341 void ensureStructuralLayer(StructuralLayerPurpose); 342 342 StructuralLayerPurpose structuralLayerPurpose() const; 343 343
Note: See TracChangeset
for help on using the changeset viewer.