OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 // Disable for reading compositingState() below. | 85 // Disable for reading compositingState() below. |
86 DisableCompositingQueryAsserts disabler; | 86 DisableCompositingQueryAsserts disabler; |
87 | 87 |
88 for (RenderLayer* curr = m_renderer.layer()->firstChild(); curr; curr = curr
->nextSibling()) { | 88 for (RenderLayer* curr = m_renderer.layer()->firstChild(); curr; curr = curr
->nextSibling()) { |
89 if (curr->compositingState() != PaintsIntoOwnBacking && curr->compositin
gState() != PaintsIntoGroupedBacking) | 89 if (curr->compositingState() != PaintsIntoOwnBacking && curr->compositin
gState() != PaintsIntoGroupedBacking) |
90 curr->paintInvalidator().paintInvalidationIncludingNonCompositingDes
cendantsInternal(paintInvalidationContainer); | 90 curr->paintInvalidator().paintInvalidationIncludingNonCompositingDes
cendantsInternal(paintInvalidationContainer); |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
| 94 LayoutRect RenderLayerRepainter::paintInvalidationRectIncludingNonCompositingDes
cendants() const |
| 95 { |
| 96 LayoutRect paintInvalidationRect = m_renderer.previousPaintInvalidationRect(
); |
| 97 |
| 98 for (RenderLayer* child = m_renderer.layer()->firstChild(); child; child = c
hild->nextSibling()) { |
| 99 // Don't include paint invalidation rects for composited child layers; t
hey will paint themselves and have a different origin. |
| 100 if (child->compositingState() == PaintsIntoOwnBacking || child->composit
ingState() == PaintsIntoGroupedBacking) |
| 101 continue; |
| 102 |
| 103 paintInvalidationRect.unite(child->paintInvalidator().paintInvalidationR
ectIncludingNonCompositingDescendants()); |
| 104 } |
| 105 return paintInvalidationRect; |
| 106 } |
| 107 |
94 void RenderLayerRepainter::setBackingNeedsPaintInvalidationInRect(const LayoutRe
ct& r) | 108 void RenderLayerRepainter::setBackingNeedsPaintInvalidationInRect(const LayoutRe
ct& r) |
95 { | 109 { |
96 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible
crash here, | 110 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible
crash here, |
97 // so assert but check that the layer is composited. | 111 // so assert but check that the layer is composited. |
98 ASSERT(m_renderer.compositingState() != NotComposited); | 112 ASSERT(m_renderer.compositingState() != NotComposited); |
99 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squashing-agnostic. | 113 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squashing-agnostic. |
100 if (m_renderer.layer()->groupedMapping()) { | 114 if (m_renderer.layer()->groupedMapping()) { |
101 LayoutRect paintInvalidationRect = r; | 115 LayoutRect paintInvalidationRect = r; |
102 paintInvalidationRect.move(m_renderer.layer()->subpixelAccumulation()); | 116 paintInvalidationRect.move(m_renderer.layer()->subpixelAccumulation()); |
103 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()
->squashingLayer()) | 117 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()
->squashingLayer()) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 RenderLayer* RenderLayerRepainter::enclosingFilterPaintInvalidationLayer() const | 159 RenderLayer* RenderLayerRepainter::enclosingFilterPaintInvalidationLayer() const |
146 { | 160 { |
147 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { | 161 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { |
148 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) | 162 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) |
149 return const_cast<RenderLayer*>(curr); | 163 return const_cast<RenderLayer*>(curr); |
150 } | 164 } |
151 return 0; | 165 return 0; |
152 } | 166 } |
153 | 167 |
154 } // namespace blink | 168 } // namespace blink |
OLD | NEW |