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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // It's nullptr if the layer is not composited or paints into grouped backin
g. | 126 // It's nullptr if the layer is not composited or paints into grouped backin
g. |
127 OwnPtr<CompositedLayerMapping> compositedLayerMapping; | 127 OwnPtr<CompositedLayerMapping> compositedLayerMapping; |
128 | 128 |
129 // If the layer paints into grouped backing (i.e. squashed), this points to
the | 129 // If the layer paints into grouped backing (i.e. squashed), this points to
the |
130 // grouped CompositedLayerMapping. It's null if the layer is not composited
or | 130 // grouped CompositedLayerMapping. It's null if the layer is not composited
or |
131 // paints into its own backing. | 131 // paints into its own backing. |
132 CompositedLayerMapping* groupedMapping; | 132 CompositedLayerMapping* groupedMapping; |
133 | 133 |
134 OwnPtr<PaintLayerReflectionInfo> reflectionInfo; | 134 OwnPtr<PaintLayerReflectionInfo> reflectionInfo; |
135 | 135 |
| 136 OwnPtr<PaintLayerFilterInfo> filterInfo; |
| 137 |
136 // The accumulated subpixel offset of a composited layer's composited bounds
compared to absolute coordinates. | 138 // The accumulated subpixel offset of a composited layer's composited bounds
compared to absolute coordinates. |
137 LayoutSize subpixelAccumulation; | 139 LayoutSize subpixelAccumulation; |
138 }; | 140 }; |
139 | 141 |
140 // PaintLayer is an old object that handles lots of unrelated operations. | 142 // PaintLayer is an old object that handles lots of unrelated operations. |
141 // | 143 // |
142 // We want it to die at some point and be replaced by more focused objects, | 144 // We want it to die at some point and be replaced by more focused objects, |
143 // which would remove (or at least compartimentalize) a lot of complexity. | 145 // which would remove (or at least compartimentalize) a lot of complexity. |
144 // See the STATUS OF PAINTLAYER section below. | 146 // See the STATUS OF PAINTLAYER section below. |
145 // | 147 // |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS
crollbars; } | 461 bool containsDirtyOverlayScrollbars() const { return m_containsDirtyOverlayS
crollbars; } |
460 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir
tyOverlayScrollbars = dirtyScrollbars; } | 462 void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDir
tyOverlayScrollbars = dirtyScrollbars; } |
461 | 463 |
462 FilterOperations computeFilterOperations(const ComputedStyle&) const; | 464 FilterOperations computeFilterOperations(const ComputedStyle&) const; |
463 FilterOperations computeBackdropFilterOperations(const ComputedStyle&) const
; | 465 FilterOperations computeBackdropFilterOperations(const ComputedStyle&) const
; |
464 bool paintsWithFilters() const; | 466 bool paintsWithFilters() const; |
465 bool paintsWithBackdropFilters() const; | 467 bool paintsWithBackdropFilters() const; |
466 FilterEffect* lastFilterEffect() const; | 468 FilterEffect* lastFilterEffect() const; |
467 FilterOutsets filterOutsets() const; | 469 FilterOutsets filterOutsets() const; |
468 | 470 |
469 PaintLayerFilterInfo* filterInfo() const { return hasFilterInfo() ? PaintLay
erFilterInfo::filterInfoForLayer(this) : 0; } | 471 PaintLayerFilterInfo* filterInfo() const { return m_rareData ? m_rareData->f
ilterInfo.get() : nullptr; } |
470 PaintLayerFilterInfo* ensureFilterInfo() { return PaintLayerFilterInfo::crea
teFilterInfoForLayerIfNeeded(this); } | 472 PaintLayerFilterInfo& ensureFilterInfo(); |
471 void removeFilterInfoIfNeeded() | |
472 { | |
473 if (hasFilterInfo()) | |
474 PaintLayerFilterInfo::removeFilterInfoForLayer(this); | |
475 } | |
476 | |
477 bool hasFilterInfo() const { return m_hasFilterInfo; } | |
478 void setHasFilterInfo(bool hasFilterInfo) { m_hasFilterInfo = hasFilterInfo;
} | |
479 | 473 |
480 void updateFilters(const ComputedStyle* oldStyle, const ComputedStyle& newSt
yle); | 474 void updateFilters(const ComputedStyle* oldStyle, const ComputedStyle& newSt
yle); |
481 | 475 |
482 Node* enclosingNode() const; | 476 Node* enclosingNode() const; |
483 | 477 |
484 bool isInTopLayer() const; | 478 bool isInTopLayer() const; |
485 | 479 |
486 bool scrollsWithViewport() const; | 480 bool scrollsWithViewport() const; |
487 bool scrollsWithRespectTo(const PaintLayer*) const; | 481 bool scrollsWithRespectTo(const PaintLayer*) const; |
488 | 482 |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 unsigned m_needsPositionUpdate : 1; | 783 unsigned m_needsPositionUpdate : 1; |
790 #endif | 784 #endif |
791 | 785 |
792 unsigned m_3DTransformedDescendantStatusDirty : 1; | 786 unsigned m_3DTransformedDescendantStatusDirty : 1; |
793 // Set on a stacking context layer that has 3D descendants anywhere | 787 // Set on a stacking context layer that has 3D descendants anywhere |
794 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. | 788 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. |
795 unsigned m_has3DTransformedDescendant : 1; | 789 unsigned m_has3DTransformedDescendant : 1; |
796 | 790 |
797 unsigned m_containsDirtyOverlayScrollbars : 1; | 791 unsigned m_containsDirtyOverlayScrollbars : 1; |
798 | 792 |
799 unsigned m_hasFilterInfo : 1; | |
800 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1; | 793 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1; |
801 unsigned m_needsDescendantDependentCompositingInputsUpdate : 1; | 794 unsigned m_needsDescendantDependentCompositingInputsUpdate : 1; |
802 unsigned m_childNeedsCompositingInputsUpdate : 1; | 795 unsigned m_childNeedsCompositingInputsUpdate : 1; |
803 | 796 |
804 // Used only while determining what layers should be composited. Applies to
the tree of z-order lists. | 797 // Used only while determining what layers should be composited. Applies to
the tree of z-order lists. |
805 unsigned m_hasCompositingDescendant : 1; | 798 unsigned m_hasCompositingDescendant : 1; |
806 | 799 |
807 // Applies to the real layout layer tree (i.e., the tree determined by the l
ayer's parent and children and | 800 // Applies to the real layout layer tree (i.e., the tree determined by the l
ayer's parent and children and |
808 // as opposed to the tree formed by the z-order and normal flow lists). | 801 // as opposed to the tree formed by the z-order and normal flow lists). |
809 unsigned m_hasNonCompositedChild : 1; | 802 unsigned m_hasNonCompositedChild : 1; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 | 859 |
867 } // namespace blink | 860 } // namespace blink |
868 | 861 |
869 #ifndef NDEBUG | 862 #ifndef NDEBUG |
870 // Outside the WebCore namespace for ease of invocation from gdb. | 863 // Outside the WebCore namespace for ease of invocation from gdb. |
871 void showLayerTree(const blink::PaintLayer*); | 864 void showLayerTree(const blink::PaintLayer*); |
872 void showLayerTree(const blink::LayoutObject*); | 865 void showLayerTree(const blink::LayoutObject*); |
873 #endif | 866 #endif |
874 | 867 |
875 #endif // Layer_h | 868 #endif // Layer_h |
OLD | NEW |