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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "core/layout/LayoutBox.h" | 50 #include "core/layout/LayoutBox.h" |
51 #include "core/paint/PaintLayerClipper.h" | 51 #include "core/paint/PaintLayerClipper.h" |
52 #include "core/paint/PaintLayerFilterInfo.h" | 52 #include "core/paint/PaintLayerFilterInfo.h" |
53 #include "core/paint/PaintLayerFragment.h" | 53 #include "core/paint/PaintLayerFragment.h" |
54 #include "core/paint/PaintLayerPainter.h" | 54 #include "core/paint/PaintLayerPainter.h" |
55 #include "core/paint/PaintLayerReflectionInfo.h" | 55 #include "core/paint/PaintLayerReflectionInfo.h" |
56 #include "core/paint/PaintLayerScrollableArea.h" | 56 #include "core/paint/PaintLayerScrollableArea.h" |
57 #include "core/paint/PaintLayerStackingNode.h" | 57 #include "core/paint/PaintLayerStackingNode.h" |
58 #include "core/paint/PaintLayerStackingNodeIterator.h" | 58 #include "core/paint/PaintLayerStackingNodeIterator.h" |
59 #include "platform/graphics/CompositingReasons.h" | 59 #include "platform/graphics/CompositingReasons.h" |
| 60 #include "platform/graphics/SquashingDisallowedReasons.h" |
60 #include "public/platform/WebBlendMode.h" | 61 #include "public/platform/WebBlendMode.h" |
61 #include "wtf/Allocator.h" | 62 #include "wtf/Allocator.h" |
62 #include "wtf/OwnPtr.h" | 63 #include "wtf/OwnPtr.h" |
63 | 64 |
64 namespace blink { | 65 namespace blink { |
65 | 66 |
66 class CompositedLayerMapping; | 67 class CompositedLayerMapping; |
67 class ComputedStyle; | 68 class ComputedStyle; |
68 class FilterEffectBuilder; | 69 class FilterEffectBuilder; |
69 class FilterOperations; | 70 class FilterOperations; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // visual ones. Internally we try to use flow-thread coordinates whenever po
ssible. | 111 // visual ones. Internally we try to use flow-thread coordinates whenever po
ssible. |
111 PaintLayer* enclosingPaginationLayer; | 112 PaintLayer* enclosingPaginationLayer; |
112 | 113 |
113 // These compositing reasons are updated whenever style changes, not while u
pdating compositing layers. | 114 // These compositing reasons are updated whenever style changes, not while u
pdating compositing layers. |
114 // They should not be used to infer the compositing state of this layer. | 115 // They should not be used to infer the compositing state of this layer. |
115 CompositingReasons potentialCompositingReasonsFromStyle; | 116 CompositingReasons potentialCompositingReasonsFromStyle; |
116 | 117 |
117 // Once computed, indicates all that a layer needs to become composited usin
g the CompositingReasons enum bitfield. | 118 // Once computed, indicates all that a layer needs to become composited usin
g the CompositingReasons enum bitfield. |
118 CompositingReasons compositingReasons; | 119 CompositingReasons compositingReasons; |
119 | 120 |
| 121 // This captures reasons why a paint layer might be forced to be separately |
| 122 // composited rather than sharing a backing with another layer. |
| 123 SquashingDisallowedReasons squashingDisallowedReasons; |
| 124 |
120 // If the layer paints into its own backings, this keeps track of the backin
gs. | 125 // If the layer paints into its own backings, this keeps track of the backin
gs. |
121 // 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. |
122 OwnPtr<CompositedLayerMapping> compositedLayerMapping; | 127 OwnPtr<CompositedLayerMapping> compositedLayerMapping; |
123 | 128 |
124 // 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 |
125 // 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 |
126 // paints into its own backing. | 131 // paints into its own backing. |
127 CompositedLayerMapping* groupedMapping; | 132 CompositedLayerMapping* groupedMapping; |
128 | 133 |
129 OwnPtr<PaintLayerReflectionInfo> reflectionInfo; | 134 OwnPtr<PaintLayerReflectionInfo> reflectionInfo; |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 bool hasAncestorWithClipPath() const { ASSERT(!m_needsAncestorDependentCompo
sitingInputsUpdate); return m_hasAncestorWithClipPath; } | 588 bool hasAncestorWithClipPath() const { ASSERT(!m_needsAncestorDependentCompo
sitingInputsUpdate); return m_hasAncestorWithClipPath; } |
584 bool hasDescendantWithClipPath() const { ASSERT(!m_needsDescendantDependentC
ompositingInputsUpdate); return m_hasDescendantWithClipPath; } | 589 bool hasDescendantWithClipPath() const { ASSERT(!m_needsDescendantDependentC
ompositingInputsUpdate); return m_hasDescendantWithClipPath; } |
585 bool hasNonIsolatedDescendantWithBlendMode() const; | 590 bool hasNonIsolatedDescendantWithBlendMode() const; |
586 | 591 |
587 bool lostGroupedMapping() const { ASSERT(isAllowedToQueryCompositingState())
; return m_lostGroupedMapping; } | 592 bool lostGroupedMapping() const { ASSERT(isAllowedToQueryCompositingState())
; return m_lostGroupedMapping; } |
588 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } | 593 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } |
589 | 594 |
590 CompositingReasons compositingReasons() const { ASSERT(isAllowedToQueryCompo
sitingState()); return m_rareData ? m_rareData->compositingReasons : Compositing
ReasonNone; } | 595 CompositingReasons compositingReasons() const { ASSERT(isAllowedToQueryCompo
sitingState()); return m_rareData ? m_rareData->compositingReasons : Compositing
ReasonNone; } |
591 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com
positingReasonAll); | 596 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com
positingReasonAll); |
592 | 597 |
| 598 SquashingDisallowedReasons squashingDisallowedReasons() const { ASSERT(isAll
owedToQueryCompositingState()); return m_rareData ? m_rareData->squashingDisallo
wedReasons : SquashingDisallowedReasonsNone; } |
| 599 void setSquashingDisallowedReasons(SquashingDisallowedReasons); |
| 600 |
593 bool hasCompositingDescendant() const { ASSERT(isAllowedToQueryCompositingSt
ate()); return m_hasCompositingDescendant; } | 601 bool hasCompositingDescendant() const { ASSERT(isAllowedToQueryCompositingSt
ate()); return m_hasCompositingDescendant; } |
594 void setHasCompositingDescendant(bool); | 602 void setHasCompositingDescendant(bool); |
595 | 603 |
596 bool shouldIsolateCompositedDescendants() const { ASSERT(isAllowedToQueryCom
positingState()); return m_shouldIsolateCompositedDescendants; } | 604 bool shouldIsolateCompositedDescendants() const { ASSERT(isAllowedToQueryCom
positingState()); return m_shouldIsolateCompositedDescendants; } |
597 void setShouldIsolateCompositedDescendants(bool); | 605 void setShouldIsolateCompositedDescendants(bool); |
598 | 606 |
599 void updateDescendantDependentFlags(); | 607 void updateDescendantDependentFlags(); |
600 | 608 |
601 void updateOrRemoveFilterEffectBuilder(); | 609 void updateOrRemoveFilterEffectBuilder(); |
602 | 610 |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 | 870 |
863 } // namespace blink | 871 } // namespace blink |
864 | 872 |
865 #ifndef NDEBUG | 873 #ifndef NDEBUG |
866 // Outside the WebCore namespace for ease of invocation from gdb. | 874 // Outside the WebCore namespace for ease of invocation from gdb. |
867 void showLayerTree(const blink::PaintLayer*); | 875 void showLayerTree(const blink::PaintLayer*); |
868 void showLayerTree(const blink::LayoutObject*); | 876 void showLayerTree(const blink::LayoutObject*); |
869 #endif | 877 #endif |
870 | 878 |
871 #endif // Layer_h | 879 #endif // Layer_h |
OLD | NEW |