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 2754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2765 return (Transform() || | 2765 return (Transform() || |
2766 GetLayoutObject().Style()->GetPosition() == EPosition::kFixed) && | 2766 GetLayoutObject().Style()->GetPosition() == EPosition::kFixed) && |
2767 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) || | 2767 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) || |
2768 GetCompositingState() != kPaintsIntoOwnBacking); | 2768 GetCompositingState() != kPaintsIntoOwnBacking); |
2769 } | 2769 } |
2770 | 2770 |
2771 bool PaintLayer::SupportsSubsequenceCaching() const { | 2771 bool PaintLayer::SupportsSubsequenceCaching() const { |
2772 if (EnclosingPaginationLayer()) | 2772 if (EnclosingPaginationLayer()) |
2773 return false; | 2773 return false; |
2774 | 2774 |
2775 // SVG paints atomically. | 2775 // SVG documents paint atomically. |
2776 if (GetLayoutObject().IsSVGRoot()) | 2776 if (GetLayoutObject().IsSVGRoot() && |
| 2777 GetLayoutObject().GetDocument().IsSVGDocument()) |
2777 return true; | 2778 return true; |
2778 | 2779 |
2779 // Create subsequence for only stacking contexts whose painting are atomic. | 2780 // Create subsequence for only stacking contexts whose painting are atomic. |
2780 if (!StackingNode()->IsStackingContext()) | 2781 if (!StackingNode()->IsStackingContext()) |
2781 return false; | 2782 return false; |
2782 | 2783 |
2783 // The layer doesn't have children. Subsequence caching is not worth it, | 2784 // The layer doesn't have children. Subsequence caching is not worth it, |
2784 // because normally the actual painting will be cheap. | 2785 // because normally the actual painting will be cheap. |
2785 // SVG is also painted atomically. | 2786 // SVG is also painted atomically. |
2786 if (!PaintLayerStackingNodeIterator(*StackingNode(), kAllChildren).Next()) | 2787 if (!PaintLayerStackingNodeIterator(*StackingNode(), kAllChildren).Next()) |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3328 } | 3329 } |
3329 | 3330 |
3330 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3331 void showLayerTree(const blink::LayoutObject* layoutObject) { |
3331 if (!layoutObject) { | 3332 if (!layoutObject) { |
3332 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3333 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
3333 return; | 3334 return; |
3334 } | 3335 } |
3335 showLayerTree(layoutObject->EnclosingLayer()); | 3336 showLayerTree(layoutObject->EnclosingLayer()); |
3336 } | 3337 } |
3337 #endif | 3338 #endif |
OLD | NEW |