| 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 |
| 114 WebInvalidationDebugAnnotations annotations = WebInvalidationDebugAnnotation
sNone; |
| 115 if (!m_renderer.hadPaintInvalidation()) |
| 116 annotations = WebInvalidationDebugAnnotationsFirstPaint; |
| 117 m_renderer.setHadPaintInvalidation(); |
| 118 |
| 113 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squashing-agnostic. | 119 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squashing-agnostic. |
| 114 if (m_renderer.layer()->groupedMapping()) { | 120 if (m_renderer.layer()->groupedMapping()) { |
| 115 LayoutRect paintInvalidationRect = r; | 121 LayoutRect paintInvalidationRect = r; |
| 116 paintInvalidationRect.move(m_renderer.layer()->subpixelAccumulation()); | 122 paintInvalidationRect.move(m_renderer.layer()->subpixelAccumulation()); |
| 117 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()
->squashingLayer()) | 123 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()
->squashingLayer()) |
| 118 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval
idationRect)); | 124 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval
idationRect), annotations); |
| 119 } else { | 125 } else { |
| 120 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe
ct(r); | 126 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe
ct(r, annotations); |
| 121 } | 127 } |
| 122 } | 128 } |
| 123 | 129 |
| 124 void RenderLayerRepainter::setFilterBackendNeedsPaintInvalidationInRect(const La
youtRect& rect) | 130 void RenderLayerRepainter::setFilterBackendNeedsPaintInvalidationInRect(const La
youtRect& rect) |
| 125 { | 131 { |
| 126 if (rect.isEmpty()) | 132 if (rect.isEmpty()) |
| 127 return; | 133 return; |
| 128 LayoutRect rectForPaintInvalidation = rect; | 134 LayoutRect rectForPaintInvalidation = rect; |
| 129 | 135 |
| 130 ASSERT(m_renderer.layer()->filterInfo()); | 136 ASSERT(m_renderer.layer()->filterInfo()); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 159 RenderLayer* RenderLayerRepainter::enclosingFilterPaintInvalidationLayer() const | 165 RenderLayer* RenderLayerRepainter::enclosingFilterPaintInvalidationLayer() const |
| 160 { | 166 { |
| 161 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { | 167 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { |
| 162 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) | 168 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) |
| 163 return const_cast<RenderLayer*>(curr); | 169 return const_cast<RenderLayer*>(curr); |
| 164 } | 170 } |
| 165 return 0; | 171 return 0; |
| 166 } | 172 } |
| 167 | 173 |
| 168 } // namespace blink | 174 } // namespace blink |
| OLD | NEW |