| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 PaintLayer* removeChild(PaintLayer*); | 232 PaintLayer* removeChild(PaintLayer*); |
| 233 | 233 |
| 234 void removeOnlyThisLayerAfterStyleChange(); | 234 void removeOnlyThisLayerAfterStyleChange(); |
| 235 void insertOnlyThisLayerAfterStyleChange(); | 235 void insertOnlyThisLayerAfterStyleChange(); |
| 236 | 236 |
| 237 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle); | 237 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle); |
| 238 | 238 |
| 239 // FIXME: Many people call this function while it has out-of-date informatio
n. | 239 // FIXME: Many people call this function while it has out-of-date informatio
n. |
| 240 bool isSelfPaintingLayer() const { return m_isSelfPaintingLayer; } | 240 bool isSelfPaintingLayer() const { return m_isSelfPaintingLayer; } |
| 241 | 241 |
| 242 // PaintLayers which represent LayoutParts may become self-painting due to b
eing composited. |
| 243 // If this is the case, this method returns true. |
| 244 bool isSelfPaintingOnlyBecauseIsCompositedPart() const; |
| 245 |
| 242 void setLayerType(PaintLayerType layerType) { m_layerType = layerType; ASSER
T(static_cast<PaintLayerType>(m_layerType) == layerType); } | 246 void setLayerType(PaintLayerType layerType) { m_layerType = layerType; ASSER
T(static_cast<PaintLayerType>(m_layerType) == layerType); } |
| 243 | 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 { |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 return *m_rareData; | 783 return *m_rareData; |
| 780 } | 784 } |
| 781 | 785 |
| 782 void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer) | 786 void mergeNeedsPaintPhaseFlagsFrom(const PaintLayer& layer) |
| 783 { | 787 { |
| 784 m_needsPaintPhaseDescendantOutlines |= layer.m_needsPaintPhaseDescendant
Outlines; | 788 m_needsPaintPhaseDescendantOutlines |= layer.m_needsPaintPhaseDescendant
Outlines; |
| 785 m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat; | 789 m_needsPaintPhaseFloat |= layer.m_needsPaintPhaseFloat; |
| 786 m_needsPaintPhaseDescendantBlockBackgrounds |= layer.m_needsPaintPhaseDe
scendantBlockBackgrounds; | 790 m_needsPaintPhaseDescendantBlockBackgrounds |= layer.m_needsPaintPhaseDe
scendantBlockBackgrounds; |
| 787 } | 791 } |
| 788 | 792 |
| 793 bool isSelfPaintingLayerForIntrinsicOrScrollingReasons() const; |
| 794 |
| 789 unsigned m_layerType : 2; // PaintLayerType | 795 unsigned m_layerType : 2; // PaintLayerType |
| 790 | 796 |
| 791 // Self-painting layer is an optimization where we avoid the heavy Layer pai
nting | 797 // Self-painting layer is an optimization where we avoid the heavy Layer pai
nting |
| 792 // machinery for a Layer allocated only to handle the overflow clip case. | 798 // machinery for a Layer allocated only to handle the overflow clip case. |
| 793 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov
erflow-only concept. | 799 // FIXME(crbug.com/332791): Self-painting layer should be merged into the ov
erflow-only concept. |
| 794 unsigned m_isSelfPaintingLayer : 1; | 800 unsigned m_isSelfPaintingLayer : 1; |
| 795 | 801 |
| 796 // If have no self-painting descendants, we don't have to walk our children
during painting. This can lead to | 802 // If have no self-painting descendants, we don't have to walk our children
during painting. This can lead to |
| 797 // significant savings, especially if the tree has lots of non-self-painting
layers grouped together (e.g. table cells). | 803 // significant savings, especially if the tree has lots of non-self-painting
layers grouped together (e.g. table cells). |
| 798 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; | 804 mutable unsigned m_hasSelfPaintingLayerDescendant : 1; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 | 898 |
| 893 } // namespace blink | 899 } // namespace blink |
| 894 | 900 |
| 895 #ifndef NDEBUG | 901 #ifndef NDEBUG |
| 896 // Outside the WebCore namespace for ease of invocation from gdb. | 902 // Outside the WebCore namespace for ease of invocation from gdb. |
| 897 void showLayerTree(const blink::PaintLayer*); | 903 void showLayerTree(const blink::PaintLayer*); |
| 898 void showLayerTree(const blink::LayoutObject*); | 904 void showLayerTree(const blink::LayoutObject*); |
| 899 #endif | 905 #endif |
| 900 | 906 |
| 901 #endif // Layer_h | 907 #endif // Layer_h |
| OLD | NEW |