Modified: trunk/Source/WebCore/ChangeLog (140236 => 140237)
--- trunk/Source/WebCore/ChangeLog 2013-01-19 06:20:09 UTC (rev 140236)
+++ trunk/Source/WebCore/ChangeLog 2013-01-19 07:15:42 UTC (rev 140237)
@@ -1,3 +1,27 @@
+2013-01-18 Huang Dongsung <[email protected]>
+
+ [Mac] Remove unused pageScaleFactor and positionRelativeToBase arguments in GraphicsLayerCA.
+ https://bugs.webkit.org/show_bug.cgi?id=107357
+
+ 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):
+
2013-01-18 Dimitri Glazkov <[email protected]>
Move attributeNameMatches from SelectorChecker to its proper place on Attribute.
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (140236 => 140237)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2013-01-19 06:20:09 UTC (rev 140236)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2013-01-19 07:15:42 UTC (rev 140237)
@@ -1065,13 +1065,13 @@
// Need to handle Preserves3DChanged first, because it affects which layers subsequent properties are applied to
if (m_uncommittedChanges & (Preserves3DChanged | ReplicatedLayerChanged))
- updateStructuralLayer(pageScaleFactor, positionRelativeToBase);
+ updateStructuralLayer();
if (m_uncommittedChanges & GeometryChanged)
updateGeometry(pageScaleFactor, positionRelativeToBase);
if (m_uncommittedChanges & DrawsContentChanged)
- updateLayerDrawsContent(pageScaleFactor, positionRelativeToBase);
+ updateLayerDrawsContent(pageScaleFactor);
if (m_uncommittedChanges & NameChanged)
updateLayerNames();
@@ -1123,7 +1123,7 @@
// Updating the contents scale can cause parts of the layer to be invalidated,
// so make sure to update the contents scale before updating the dirty rects.
if (m_uncommittedChanges & ContentsScaleChanged)
- updateContentsScale(pageScaleFactor, positionRelativeToBase);
+ updateContentsScale(pageScaleFactor);
if (m_uncommittedChanges & VisibleRectChanged)
updateVisibleRect(oldVisibleRect);
@@ -1237,7 +1237,7 @@
bool needTiledLayer = requiresTiledLayer(pageScaleFactor);
if (needTiledLayer != m_usingTiledLayer)
- swapFromOrToTiledLayer(needTiledLayer, pageScaleFactor, positionRelativeToBase);
+ swapFromOrToTiledLayer(needTiledLayer);
FloatSize usedSize = m_usingTiledLayer ? constrainedSize() : scaledSize;
FloatRect adjustedBounds(m_boundsOrigin - pixelAlignmentOffset, usedSize);
@@ -1406,12 +1406,12 @@
}
#endif
-void GraphicsLayerCA::updateStructuralLayer(float pageScaleFactor, const FloatPoint& positionRelativeToBase)
+void GraphicsLayerCA::updateStructuralLayer()
{
- ensureStructuralLayer(structuralLayerPurpose(), pageScaleFactor, positionRelativeToBase);
+ ensureStructuralLayer(structuralLayerPurpose());
}
-void GraphicsLayerCA::ensureStructuralLayer(StructuralLayerPurpose purpose, float /*pageScaleFactor*/, const FloatPoint& /*positionRelativeToBase*/)
+void GraphicsLayerCA::ensureStructuralLayer(StructuralLayerPurpose purpose)
{
const LayerChangeFlags structuralLayerChangeFlags = NameChanged
| GeometryChanged
@@ -1505,11 +1505,11 @@
return NoStructuralLayer;
}
-void GraphicsLayerCA::updateLayerDrawsContent(float pageScaleFactor, const FloatPoint& positionRelativeToBase)
+void GraphicsLayerCA::updateLayerDrawsContent(float pageScaleFactor)
{
bool needTiledLayer = requiresTiledLayer(pageScaleFactor);
if (needTiledLayer != m_usingTiledLayer)
- swapFromOrToTiledLayer(needTiledLayer, pageScaleFactor, positionRelativeToBase);
+ swapFromOrToTiledLayer(needTiledLayer);
if (m_drawsContent)
m_layer->setNeedsDisplay();
@@ -2482,11 +2482,11 @@
return max(minScale, min(scale, maxScale));
}
-void GraphicsLayerCA::updateContentsScale(float pageScaleFactor, const FloatPoint& positionRelativeToBase)
+void GraphicsLayerCA::updateContentsScale(float pageScaleFactor)
{
bool needTiledLayer = requiresTiledLayer(pageScaleFactor);
if (needTiledLayer != m_usingTiledLayer)
- swapFromOrToTiledLayer(needTiledLayer, pageScaleFactor, positionRelativeToBase);
+ swapFromOrToTiledLayer(needTiledLayer);
float contentsScale = clampedContentsScaleForScale(pageScaleFactor * deviceScaleFactor());
@@ -2603,7 +2603,7 @@
return m_size.width() * pageScaleFactor > cMaxPixelDimension || m_size.height() * pageScaleFactor > cMaxPixelDimension;
}
-void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer, float /*pageScaleFactor*/, const FloatPoint& /*positionRelativeToBase*/)
+void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer)
{
ASSERT(m_layer->layerType() != PlatformCALayer::LayerTypePageTileCacheLayer);
ASSERT(useTiledLayer != m_usingTiledLayer);
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (140236 => 140237)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2013-01-19 06:20:09 UTC (rev 140236)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2013-01-19 07:15:42 UTC (rev 140237)
@@ -221,7 +221,7 @@
FloatSize constrainedSize() const;
bool requiresTiledLayer(float pageScaleFactor) const;
- void swapFromOrToTiledLayer(bool useTiledLayer, float pageScaleFactor, const FloatPoint& positionRelativeToBase);
+ void swapFromOrToTiledLayer(bool useTiledLayer);
CompositingCoordinatesOrientation defaultContentsOrientation() const;
@@ -314,8 +314,8 @@
void updateContentsVisibility();
void updateContentsOpaque();
void updateBackfaceVisibility();
- void updateStructuralLayer(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
- void updateLayerDrawsContent(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
+ void updateStructuralLayer();
+ void updateLayerDrawsContent(float pixelAlignmentScale);
void updateBackgroundColor();
void updateContentsImage();
@@ -331,14 +331,14 @@
void updateAcceleratesDrawing();
void updateDebugBorder();
void updateVisibleRect(const FloatRect& oldVisibleRect);
- void updateContentsScale(float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
+ void updateContentsScale(float pageScaleFactor);
enum StructuralLayerPurpose {
NoStructuralLayer = 0,
StructuralLayerForPreserves3D,
StructuralLayerForReplicaFlattening
};
- void ensureStructuralLayer(StructuralLayerPurpose, float pixelAlignmentScale, const FloatPoint& positionRelativeToBase);
+ void ensureStructuralLayer(StructuralLayerPurpose);
StructuralLayerPurpose structuralLayerPurpose() const;
void setAnimationOnLayer(PlatformCAAnimation*, AnimatedPropertyID, const String& animationName, int index, double timeOffset);