Changeset 148707 in webkit
- Timestamp:
- Apr 18, 2013 3:29:31 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148701 r148707 1 2013-04-18 Simon Fraser <simon.fraser@apple.com> 2 3 Remove GraphicsLayerCA::constrainedSize() now that we can manage large layer memory use ourselves in TileController 4 https://bugs.webkit.org/show_bug.cgi?id=114834 5 6 Reviewed by Tim Horton. 7 8 GraphicsLayerCA::constrainedSize() was added to handle poor CATiledLayer behavior when layer sizes 9 got extremely large. Now that we no longer use CATiledLayer, remove this code. We can later add 10 tile memory bounding to TileController if that becomes necessary. 11 12 * platform/graphics/ca/GraphicsLayerCA.cpp: 13 (WebCore::GraphicsLayerCA::updateGeometry): 14 * platform/graphics/ca/GraphicsLayerCA.h: 15 (GraphicsLayerCA): 16 1 17 2013-04-18 Alberto Garcia <agarcia@igalia.com> 2 18 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r148651 r148707 1306 1306 computePixelAlignment(pageScaleFactor, positionRelativeToBase, scaledPosition, scaledSize, scaledAnchorPoint, pixelAlignmentOffset); 1307 1307 1308 FloatSize usedSize = m_usingTiledBacking ? constrainedSize() : scaledSize; 1309 FloatRect adjustedBounds(m_boundsOrigin - pixelAlignmentOffset, usedSize); 1308 FloatRect adjustedBounds(m_boundsOrigin - pixelAlignmentOffset, scaledSize); 1310 1309 1311 1310 // Update position. 1312 1311 // Position is offset on the layer by the layer anchor point. 1313 FloatPoint adjustedPosition(scaledPosition.x() + scaledAnchorPoint.x() * usedSize.width(), scaledPosition.y() + scaledAnchorPoint.y() * usedSize.height());1312 FloatPoint adjustedPosition(scaledPosition.x() + scaledAnchorPoint.x() * scaledSize.width(), scaledPosition.y() + scaledAnchorPoint.y() * scaledSize.height()); 1314 1313 1315 1314 if (m_structuralLayer) { … … 1341 1340 // If we have a structural layer, we just use 0.5, 0.5 for the anchor point of the main layer. 1342 1341 scaledAnchorPoint = FloatPoint(0.5f, 0.5f); 1343 adjustedPosition = FloatPoint(scaledAnchorPoint.x() * usedSize.width() - pixelAlignmentOffset.width(), scaledAnchorPoint.y() * usedSize.height() - pixelAlignmentOffset.height());1342 adjustedPosition = FloatPoint(scaledAnchorPoint.x() * scaledSize.width() - pixelAlignmentOffset.width(), scaledAnchorPoint.y() * scaledSize.height() - pixelAlignmentOffset.height()); 1344 1343 } 1345 1344 … … 2650 2649 } 2651 2650 2652 FloatSize GraphicsLayerCA::constrainedSize() const2653 {2654 FloatSize constrainedSize = m_size;2655 #if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 10602656 float tileColumns = ceilf(m_size.width() / kTiledLayerTileSize);2657 float tileRows = ceilf(m_size.height() / kTiledLayerTileSize);2658 double numTiles = tileColumns * tileRows;2659 2660 const unsigned cMaxTileCount = 512;2661 while (numTiles > cMaxTileCount) {2662 // Constrain the wider dimension.2663 if (constrainedSize.width() >= constrainedSize.height()) {2664 tileColumns = max(floorf(cMaxTileCount / tileRows), 1.0f);2665 constrainedSize.setWidth(tileColumns * kTiledLayerTileSize);2666 } else {2667 tileRows = max(floorf(cMaxTileCount / tileColumns), 1.0f);2668 constrainedSize.setHeight(tileRows * kTiledLayerTileSize);2669 }2670 numTiles = tileColumns * tileRows;2671 }2672 #endif2673 return constrainedSize;2674 }2675 2676 2651 bool GraphicsLayerCA::requiresTiledLayer(float pageScaleFactor) const 2677 2652 { -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r148651 r148707 228 228 229 229 FloatPoint computePositionRelativeToBase(float& pageScale) const; 230 231 FloatSize constrainedSize() const;232 230 233 231 bool requiresTiledLayer(float pageScaleFactor) const;
Note: See TracChangeset
for help on using the changeset viewer.