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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 paintInvalidationRect.unite(child->paintInvalidator().paintInvalidationR
ectIncludingNonCompositingDescendants()); | 103 paintInvalidationRect.unite(child->paintInvalidator().paintInvalidationR
ectIncludingNonCompositingDescendants()); |
104 } | 104 } |
105 return paintInvalidationRect; | 105 return paintInvalidationRect; |
106 } | 106 } |
107 | 107 |
108 void RenderLayerRepainter::setBackingNeedsPaintInvalidationInRect(const LayoutRe
ct& r) | 108 void RenderLayerRepainter::setBackingNeedsPaintInvalidationInRect(const LayoutRe
ct& r) |
109 { | 109 { |
110 // 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, |
111 // so assert but check that the layer is composited. | 111 // so assert but check that the layer is composited. |
112 ASSERT(m_renderer.compositingState() != NotComposited); | 112 ASSERT(m_renderer.compositingState() != NotComposited); |
113 if (m_renderer.compositingState() == NotComposited) { | 113 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squashing-agnostic. |
114 // If we're trying to issue paint invalidations of the placeholder docum
ent layer, propagate the | |
115 // paint invalidation to the native view system. | |
116 LayoutRect absRect(r); | |
117 LayoutPoint delta; | |
118 m_renderer.layer()->convertToLayerCoords(m_renderer.layer()->root(), del
ta); | |
119 absRect.moveBy(delta); | |
120 | |
121 if (absRect.isEmpty()) | |
122 return; | |
123 | |
124 RenderView* view = m_renderer.view(); | |
125 if (view) | |
126 view->invalidatePaintForRectangle(absRect); | |
127 return; | |
128 } | |
129 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squasphing-agnostic. | |
130 if (m_renderer.layer()->groupedMapping()) { | 114 if (m_renderer.layer()->groupedMapping()) { |
131 LayoutRect paintInvalidationRect = r; | 115 LayoutRect paintInvalidationRect = r; |
132 paintInvalidationRect.move(m_renderer.layer()->subpixelAccumulation()); | 116 paintInvalidationRect.move(m_renderer.layer()->subpixelAccumulation()); |
133 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()
->squashingLayer()) | 117 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()
->squashingLayer()) |
134 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval
idationRect)); | 118 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval
idationRect)); |
135 } else { | 119 } else { |
136 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe
ct(r); | 120 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe
ct(r); |
137 } | 121 } |
138 } | 122 } |
139 | 123 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 RenderLayer* RenderLayerRepainter::enclosingFilterPaintInvalidationLayer() const | 160 RenderLayer* RenderLayerRepainter::enclosingFilterPaintInvalidationLayer() const |
177 { | 161 { |
178 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { | 162 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { |
179 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) | 163 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) |
180 return const_cast<RenderLayer*>(curr); | 164 return const_cast<RenderLayer*>(curr); |
181 } | 165 } |
182 return 0; | 166 return 0; |
183 } | 167 } |
184 | 168 |
185 } // namespace blink | 169 } // namespace blink |
OLD | NEW |