| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 PaintLayer* removeChild(PaintLayer*); | 234 PaintLayer* removeChild(PaintLayer*); |
| 235 | 235 |
| 236 void removeOnlyThisLayerAfterStyleChange(); | 236 void removeOnlyThisLayerAfterStyleChange(); |
| 237 void insertOnlyThisLayerAfterStyleChange(); | 237 void insertOnlyThisLayerAfterStyleChange(); |
| 238 | 238 |
| 239 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle); | 239 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle); |
| 240 | 240 |
| 241 // FIXME: Many people call this function while it has out-of-date informatio
n. | 241 // FIXME: Many people call this function while it has out-of-date informatio
n. |
| 242 bool isSelfPaintingLayer() const { return m_isSelfPaintingLayer; } | 242 bool isSelfPaintingLayer() const { return m_isSelfPaintingLayer; } |
| 243 | 243 |
| 244 // PaintLayers which represent LayoutParts may become self-painting due to b
eing composited. |
| 245 // If this is the case, this method returns true. |
| 246 bool isSelfPaintingOnlyBecauseIsCompositedPart() const; |
| 247 |
| 244 bool isTransparent() const { return layoutObject()->isTransparent() || layou
tObject()->style()->hasBlendMode() || layoutObject()->hasMask(); } | 248 bool isTransparent() const { return layoutObject()->isTransparent() || layou
tObject()->style()->hasBlendMode() || layoutObject()->hasMask(); } |
| 245 | 249 |
| 246 bool isReflection() const { return layoutObject()->isReplica(); } | 250 bool isReflection() const { return layoutObject()->isReplica(); } |
| 247 PaintLayerReflectionInfo* reflectionInfo() { return m_rareData ? m_rareData-
>reflectionInfo.get() : nullptr; } | 251 PaintLayerReflectionInfo* reflectionInfo() { return m_rareData ? m_rareData-
>reflectionInfo.get() : nullptr; } |
| 248 const PaintLayerReflectionInfo* reflectionInfo() const { return const_cast<P
aintLayer*>(this)->reflectionInfo(); } | 252 const PaintLayerReflectionInfo* reflectionInfo() const { return const_cast<P
aintLayer*>(this)->reflectionInfo(); } |
| 249 | 253 |
| 250 const PaintLayer* root() const | 254 const PaintLayer* root() const |
| 251 { | 255 { |
| 252 const PaintLayer* curr = this; | 256 const PaintLayer* curr = this; |
| 253 while (curr->parent()) | 257 while (curr->parent()) |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 return *m_rareData; | 788 return *m_rareData; |
| 785 } | 789 } |
| 786 | 790 |
| 787 void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer) | 791 void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer) |
| 788 { | 792 { |
| 789 m_needsPaintPhaseDescendantOutlines |= layer.m_needsPaintPhaseDescendant
Outlines; | 793 m_needsPaintPhaseDescendantOutlines |= layer.m_needsPaintPhaseDescendant
Outlines; |
| 790 m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat; | 794 m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat; |
| 791 m_needsPaintPhaseDescendantBlockBackgrounds |= layer.m_needsPaintPhaseDe
scendantBlockBackgrounds; | 795 m_needsPaintPhaseDescendantBlockBackgrounds |= layer.m_needsPaintPhaseDe
scendantBlockBackgrounds; |
| 792 } | 796 } |
| 793 | 797 |
| 798 bool isSelfPaintingLayerForIntrinsicOrScrollingReasons() const; |
| 799 |
| 794 bool shouldFragmentCompositedBounds(const PaintLayer* compositingLayer) cons
t; | 800 bool shouldFragmentCompositedBounds(const PaintLayer* compositingLayer) cons
t; |
| 795 | 801 |
| 796 // Self-painting layer is an optimization where we avoid the heavy Layer pai
nting | 802 // Self-painting layer is an optimization where we avoid the heavy Layer pai
nting |
| 797 // machinery for a Layer allocated only to handle the overflow clip case. | 803 // machinery for a Layer allocated only to handle the overflow clip case. |
| 798 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov
erflow-only concept. | 804 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov
erflow-only concept. |
| 799 unsigned m_isSelfPaintingLayer : 1; | 805 unsigned m_isSelfPaintingLayer : 1; |
| 800 | 806 |
| 801 // If have no self-painting descendants, we don't have to walk our children
during painting. This can lead to | 807 // If have no self-painting descendants, we don't have to walk our children
during painting. This can lead to |
| 802 // significant savings, especially if the tree has lots of non-self-painting
layers grouped together (e.g. table cells). | 808 // significant savings, especially if the tree has lots of non-self-painting
layers grouped together (e.g. table cells). |
| 803 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; | 809 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 | 899 |
| 894 } // namespace blink | 900 } // namespace blink |
| 895 | 901 |
| 896 #ifndef NDEBUG | 902 #ifndef NDEBUG |
| 897 // Outside the WebCore namespace for ease of invocation from gdb. | 903 // Outside the WebCore namespace for ease of invocation from gdb. |
| 898 void showLayerTree(const blink::PaintLayer*); | 904 void showLayerTree(const blink::PaintLayer*); |
| 899 void showLayerTree(const blink::LayoutObject*); | 905 void showLayerTree(const blink::LayoutObject*); |
| 900 #endif | 906 #endif |
| 901 | 907 |
| 902 #endif // Layer_h | 908 #endif // Layer_h |
| OLD | NEW |