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 2766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2777 return (Transform() || | 2777 return (Transform() || |
2778 GetLayoutObject().Style()->GetPosition() == EPosition::kFixed) && | 2778 GetLayoutObject().Style()->GetPosition() == EPosition::kFixed) && |
2779 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) || | 2779 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) || |
2780 GetCompositingState() != kPaintsIntoOwnBacking); | 2780 GetCompositingState() != kPaintsIntoOwnBacking); |
2781 } | 2781 } |
2782 | 2782 |
2783 bool PaintLayer::SupportsSubsequenceCaching() const { | 2783 bool PaintLayer::SupportsSubsequenceCaching() const { |
2784 if (EnclosingPaginationLayer()) | 2784 if (EnclosingPaginationLayer()) |
2785 return false; | 2785 return false; |
2786 | 2786 |
2787 // SVG paints atomically. | 2787 // SVG documents paint atomically. |
2788 if (GetLayoutObject().IsSVGRoot()) | 2788 if (GetLayoutObject().IsSVGRoot() && |
| 2789 GetLayoutObject().GetDocument().IsSVGDocument()) |
2789 return true; | 2790 return true; |
2790 | 2791 |
2791 // Create subsequence for only stacking contexts whose painting are atomic. | 2792 // Create subsequence for only stacking contexts whose painting are atomic. |
2792 if (!StackingNode()->IsStackingContext()) | 2793 if (!StackingNode()->IsStackingContext()) |
2793 return false; | 2794 return false; |
2794 | 2795 |
2795 // The layer doesn't have children. Subsequence caching is not worth it, | 2796 // The layer doesn't have children. Subsequence caching is not worth it, |
2796 // because normally the actual painting will be cheap. | 2797 // because normally the actual painting will be cheap. |
2797 // SVG is also painted atomically. | 2798 // SVG is also painted atomically. |
2798 if (!PaintLayerStackingNodeIterator(*StackingNode(), kAllChildren).Next()) | 2799 if (!PaintLayerStackingNodeIterator(*StackingNode(), kAllChildren).Next()) |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3340 } | 3341 } |
3341 | 3342 |
3342 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3343 void showLayerTree(const blink::LayoutObject* layoutObject) { |
3343 if (!layoutObject) { | 3344 if (!layoutObject) { |
3344 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3345 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
3345 return; | 3346 return; |
3346 } | 3347 } |
3347 showLayerTree(layoutObject->EnclosingLayer()); | 3348 showLayerTree(layoutObject->EnclosingLayer()); |
3348 } | 3349 } |
3349 #endif | 3350 #endif |
OLD | NEW |