OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1376 clipper().calculateRects(clipRectsContext, dirtyRect, fragment.layerBounds,
fragment.backgroundRect, fragment.foregroundRect, fragment.outlineRect, offsetFr
omRoot); | 1376 clipper().calculateRects(clipRectsContext, dirtyRect, fragment.layerBounds,
fragment.backgroundRect, fragment.foregroundRect, fragment.outlineRect, offsetFr
omRoot); |
1377 fragments.append(fragment); | 1377 fragments.append(fragment); |
1378 } | 1378 } |
1379 | 1379 |
1380 void DeprecatedPaintLayer::collectFragments(DeprecatedPaintLayerFragments& fragm
ents, const DeprecatedPaintLayer* rootLayer, const LayoutRect& dirtyRect, | 1380 void DeprecatedPaintLayer::collectFragments(DeprecatedPaintLayerFragments& fragm
ents, const DeprecatedPaintLayer* rootLayer, const LayoutRect& dirtyRect, |
1381 ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarSizeRelevancy inOverl
ayScrollbarSizeRelevancy, ShouldRespectOverflowClip respectOverflowClip, const L
ayoutPoint* offsetFromRoot, | 1381 ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarSizeRelevancy inOverl
ayScrollbarSizeRelevancy, ShouldRespectOverflowClip respectOverflowClip, const L
ayoutPoint* offsetFromRoot, |
1382 const LayoutSize& subPixelAccumulation, const LayoutRect* layerBoundingBox) | 1382 const LayoutSize& subPixelAccumulation, const LayoutRect* layerBoundingBox) |
1383 { | 1383 { |
1384 if (!enclosingPaginationLayer()) { | 1384 if (!enclosingPaginationLayer()) { |
1385 // For unpaginated layers, there is only one fragment. | 1385 // For unpaginated layers, there is only one fragment. |
1386 appendSingleFragmentIgnoringPagination(fragments, rootLayer, dirtyRect,
clipRectsCacheSlot, inOverlayScrollbarSizeRelevancy, respectOverflowClip, offset
FromRoot, subPixelAccumulation); | 1386 const LayoutSize subPixelAccumulationIfNeeded = compositingState() == Pa
intsIntoOwnBacking ? LayoutSize() : subPixelAccumulation; |
| 1387 appendSingleFragmentIgnoringPagination(fragments, rootLayer, dirtyRect,
clipRectsCacheSlot, inOverlayScrollbarSizeRelevancy, respectOverflowClip, offset
FromRoot, subPixelAccumulationIfNeeded); |
1387 return; | 1388 return; |
1388 } | 1389 } |
1389 | 1390 |
1390 // Compute our offset within the enclosing pagination layer. | 1391 // Compute our offset within the enclosing pagination layer. |
1391 LayoutPoint offsetWithinPaginatedLayer; | 1392 LayoutPoint offsetWithinPaginatedLayer; |
1392 convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginatedLayer)
; | 1393 convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginatedLayer)
; |
1393 | 1394 |
1394 // Calculate clip rects relative to the enclosingPaginationLayer. The purpos
e of this call is to determine our bounds clipped to intermediate | 1395 // Calculate clip rects relative to the enclosingPaginationLayer. The purpos
e of this call is to determine our bounds clipped to intermediate |
1395 // layers between us and the pagination context. It's important to minimize
the number of fragments we need to create and this helps with that. | 1396 // layers between us and the pagination context. It's important to minimize
the number of fragments we need to create and this helps with that. |
1396 ClipRectsContext paginationClipRectsContext(enclosingPaginationLayer(), clip
RectsCacheSlot, inOverlayScrollbarSizeRelevancy); | 1397 ClipRectsContext paginationClipRectsContext(enclosingPaginationLayer(), clip
RectsCacheSlot, inOverlayScrollbarSizeRelevancy); |
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2654 | 2655 |
2655 void showLayerTree(const blink::LayoutObject* layoutObject) | 2656 void showLayerTree(const blink::LayoutObject* layoutObject) |
2656 { | 2657 { |
2657 if (!layoutObject) { | 2658 if (!layoutObject) { |
2658 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2659 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2659 return; | 2660 return; |
2660 } | 2661 } |
2661 showLayerTree(layoutObject->enclosingLayer()); | 2662 showLayerTree(layoutObject->enclosingLayer()); |
2662 } | 2663 } |
2663 #endif | 2664 #endif |
OLD | NEW |