OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
6 * | 6 * |
7 * Other contributors: | 7 * Other contributors: |
8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1551 PaintLayerFragments& fragments, | 1551 PaintLayerFragments& fragments, |
1552 const PaintLayer* rootLayer, | 1552 const PaintLayer* rootLayer, |
1553 const LayoutRect& dirtyRect, | 1553 const LayoutRect& dirtyRect, |
1554 ClipRectsCacheSlot clipRectsCacheSlot, | 1554 ClipRectsCacheSlot clipRectsCacheSlot, |
1555 PaintLayer::GeometryMapperOption geometryMapperOption, | 1555 PaintLayer::GeometryMapperOption geometryMapperOption, |
1556 OverlayScrollbarClipBehavior overlayScrollbarClipBehavior, | 1556 OverlayScrollbarClipBehavior overlayScrollbarClipBehavior, |
1557 ShouldRespectOverflowClipType respectOverflowClip, | 1557 ShouldRespectOverflowClipType respectOverflowClip, |
1558 const LayoutPoint* offsetFromRoot, | 1558 const LayoutPoint* offsetFromRoot, |
1559 const LayoutSize& subPixelAccumulation, | 1559 const LayoutSize& subPixelAccumulation, |
1560 const LayoutRect* layerBoundingBox) { | 1560 const LayoutRect* layerBoundingBox) { |
1561 if (!enclosingPaginationLayer()) { | 1561 // For unpaginated layers, there is only one fragment. We also avoid |
1562 // For unpaginated layers, there is only one fragment. | 1562 // fragmentation when compositing, due to implementation limitations. |
| 1563 if (!enclosingPaginationLayer() || |
| 1564 !shouldFragmentCompositedBounds(rootLayer)) { |
1563 appendSingleFragmentIgnoringPagination( | 1565 appendSingleFragmentIgnoringPagination( |
1564 fragments, rootLayer, dirtyRect, clipRectsCacheSlot, | 1566 fragments, rootLayer, dirtyRect, clipRectsCacheSlot, |
1565 geometryMapperOption, overlayScrollbarClipBehavior, respectOverflowClip, | 1567 geometryMapperOption, overlayScrollbarClipBehavior, respectOverflowClip, |
1566 offsetFromRoot, subPixelAccumulation); | |
1567 return; | |
1568 } | |
1569 | |
1570 if (!shouldFragmentCompositedBounds(rootLayer)) { | |
1571 appendSingleFragmentIgnoringPagination( | |
1572 fragments, rootLayer, dirtyRect, clipRectsCacheSlot, | |
1573 geometryMapperOption, overlayScrollbarClipBehavior, respectOverflowClip, | |
1574 offsetFromRoot, subPixelAccumulation); | 1568 offsetFromRoot, subPixelAccumulation); |
1575 return; | 1569 return; |
1576 } | 1570 } |
1577 | 1571 |
1578 // Compute our offset within the enclosing pagination layer. | 1572 // Compute our offset within the enclosing pagination layer. |
1579 LayoutPoint offsetWithinPaginatedLayer; | 1573 LayoutPoint offsetWithinPaginatedLayer; |
1580 convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginatedLayer); | 1574 convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginatedLayer); |
1581 | 1575 |
1582 // Calculate clip rects relative to the enclosingPaginationLayer. The purpose | 1576 // Calculate clip rects relative to the enclosingPaginationLayer. The purpose |
1583 // of this call is to determine our bounds clipped to intermediate layers | 1577 // of this call is to determine our bounds clipped to intermediate layers |
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3218 } | 3212 } |
3219 | 3213 |
3220 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3214 void showLayerTree(const blink::LayoutObject* layoutObject) { |
3221 if (!layoutObject) { | 3215 if (!layoutObject) { |
3222 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3216 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
3223 return; | 3217 return; |
3224 } | 3218 } |
3225 showLayerTree(layoutObject->enclosingLayer()); | 3219 showLayerTree(layoutObject->enclosingLayer()); |
3226 } | 3220 } |
3227 #endif | 3221 #endif |
OLD | NEW |