Title: [148707] trunk/Source/WebCore
- Revision
- 148707
- Author
- simon.fra...@apple.com
- Date
- 2013-04-18 15:29:31 -0700 (Thu, 18 Apr 2013)
Log Message
Remove GraphicsLayerCA::constrainedSize() now that we can manage large layer memory use ourselves in TileController
https://bugs.webkit.org/show_bug.cgi?id=114834
Reviewed by Tim Horton.
GraphicsLayerCA::constrainedSize() was added to handle poor CATiledLayer behavior when layer sizes
got extremely large. Now that we no longer use CATiledLayer, remove this code. We can later add
tile memory bounding to TileController if that becomes necessary.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateGeometry):
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (148706 => 148707)
--- trunk/Source/WebCore/ChangeLog 2013-04-18 22:13:26 UTC (rev 148706)
+++ trunk/Source/WebCore/ChangeLog 2013-04-18 22:29:31 UTC (rev 148707)
@@ -1,3 +1,19 @@
+2013-04-18 Simon Fraser <simon.fra...@apple.com>
+
+ Remove GraphicsLayerCA::constrainedSize() now that we can manage large layer memory use ourselves in TileController
+ https://bugs.webkit.org/show_bug.cgi?id=114834
+
+ Reviewed by Tim Horton.
+
+ GraphicsLayerCA::constrainedSize() was added to handle poor CATiledLayer behavior when layer sizes
+ got extremely large. Now that we no longer use CATiledLayer, remove this code. We can later add
+ tile memory bounding to TileController if that becomes necessary.
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::updateGeometry):
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ (GraphicsLayerCA):
+
2013-04-18 Alberto Garcia <agar...@igalia.com>
Remove obsolete macros from libpng
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (148706 => 148707)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2013-04-18 22:13:26 UTC (rev 148706)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2013-04-18 22:29:31 UTC (rev 148707)
@@ -1305,12 +1305,11 @@
FloatSize pixelAlignmentOffset;
computePixelAlignment(pageScaleFactor, positionRelativeToBase, scaledPosition, scaledSize, scaledAnchorPoint, pixelAlignmentOffset);
- FloatSize usedSize = m_usingTiledBacking ? constrainedSize() : scaledSize;
- FloatRect adjustedBounds(m_boundsOrigin - pixelAlignmentOffset, usedSize);
+ FloatRect adjustedBounds(m_boundsOrigin - pixelAlignmentOffset, scaledSize);
// Update position.
// Position is offset on the layer by the layer anchor point.
- FloatPoint adjustedPosition(scaledPosition.x() + scaledAnchorPoint.x() * usedSize.width(), scaledPosition.y() + scaledAnchorPoint.y() * usedSize.height());
+ FloatPoint adjustedPosition(scaledPosition.x() + scaledAnchorPoint.x() * scaledSize.width(), scaledPosition.y() + scaledAnchorPoint.y() * scaledSize.height());
if (m_structuralLayer) {
FloatPoint layerPosition(m_position.x() + m_anchorPoint.x() * m_size.width(), m_position.y() + m_anchorPoint.y() * m_size.height());
@@ -1340,7 +1339,7 @@
// If we have a structural layer, we just use 0.5, 0.5 for the anchor point of the main layer.
scaledAnchorPoint = FloatPoint(0.5f, 0.5f);
- adjustedPosition = FloatPoint(scaledAnchorPoint.x() * usedSize.width() - pixelAlignmentOffset.width(), scaledAnchorPoint.y() * usedSize.height() - pixelAlignmentOffset.height());
+ adjustedPosition = FloatPoint(scaledAnchorPoint.x() * scaledSize.width() - pixelAlignmentOffset.width(), scaledAnchorPoint.y() * scaledSize.height() - pixelAlignmentOffset.height());
}
m_layer->setPosition(adjustedPosition);
@@ -2649,30 +2648,6 @@
}
}
-FloatSize GraphicsLayerCA::constrainedSize() const
-{
- FloatSize constrainedSize = m_size;
-#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
- float tileColumns = ceilf(m_size.width() / kTiledLayerTileSize);
- float tileRows = ceilf(m_size.height() / kTiledLayerTileSize);
- double numTiles = tileColumns * tileRows;
-
- const unsigned cMaxTileCount = 512;
- while (numTiles > cMaxTileCount) {
- // Constrain the wider dimension.
- if (constrainedSize.width() >= constrainedSize.height()) {
- tileColumns = max(floorf(cMaxTileCount / tileRows), 1.0f);
- constrainedSize.setWidth(tileColumns * kTiledLayerTileSize);
- } else {
- tileRows = max(floorf(cMaxTileCount / tileColumns), 1.0f);
- constrainedSize.setHeight(tileRows * kTiledLayerTileSize);
- }
- numTiles = tileColumns * tileRows;
- }
-#endif
- return constrainedSize;
-}
-
bool GraphicsLayerCA::requiresTiledLayer(float pageScaleFactor) const
{
if (!m_drawsContent || !m_allowTiledLayer || m_isPageTiledBackingLayer)
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (148706 => 148707)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2013-04-18 22:13:26 UTC (rev 148706)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2013-04-18 22:29:31 UTC (rev 148707)
@@ -228,8 +228,6 @@
FloatPoint computePositionRelativeToBase(float& pageScale) const;
- FloatSize constrainedSize() const;
-
bool requiresTiledLayer(float pageScaleFactor) const;
void swapFromOrToTiledLayer(bool useTiledLayer);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes