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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 // Since we're only painting non-composited layers, we know that they all share
the same repaintContainer. | 72 // Since we're only painting non-composited layers, we know that they all share
the same repaintContainer. |
73 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants() | 73 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants() |
74 { | 74 { |
75 repaintIncludingNonCompositingDescendantsInternal(m_renderer.containerForPai
ntInvalidation()); | 75 repaintIncludingNonCompositingDescendantsInternal(m_renderer.containerForPai
ntInvalidation()); |
76 } | 76 } |
77 | 77 |
78 void RenderLayerRepainter::repaintIncludingNonCompositingDescendantsInternal(con
st RenderLayerModelObject* repaintContainer) | 78 void RenderLayerRepainter::repaintIncludingNonCompositingDescendantsInternal(con
st RenderLayerModelObject* repaintContainer) |
79 { | 79 { |
80 m_renderer.invalidatePaintUsingContainer(repaintContainer, pixelSnappedIntRe
ct(m_renderer.boundsRectForPaintInvalidation(repaintContainer)), InvalidationLay
er); | 80 m_renderer.invalidatePaintUsingContainer(repaintContainer, m_renderer.bounds
RectForPaintInvalidation(repaintContainer), InvalidationLayer); |
81 | 81 |
82 // FIXME: Repaints can be issued during style recalc at present, via RenderL
ayerModelObject::styleWillChange. This happens in scenarios when | 82 // FIXME: Repaints can be issued during style recalc at present, via RenderL
ayerModelObject::styleWillChange. This happens in scenarios when |
83 // repaint is needed but not layout. | 83 // repaint is needed but not layout. |
84 DisableCompositingQueryAsserts disabler; | 84 DisableCompositingQueryAsserts disabler; |
85 | 85 |
86 for (RenderLayer* curr = m_renderer.layer()->firstChild(); curr; curr = curr
->nextSibling()) { | 86 for (RenderLayer* curr = m_renderer.layer()->firstChild(); curr; curr = curr
->nextSibling()) { |
87 if (curr->compositingState() != PaintsIntoOwnBacking && curr->compositin
gState() != PaintsIntoGroupedBacking) | 87 if (curr->compositingState() != PaintsIntoOwnBacking && curr->compositin
gState() != PaintsIntoGroupedBacking) |
88 curr->repainter().repaintIncludingNonCompositingDescendantsInternal(
repaintContainer); | 88 curr->repainter().repaintIncludingNonCompositingDescendantsInternal(
repaintContainer); |
89 } | 89 } |
90 } | 90 } |
(...skipping 26 matching lines...) Expand all Loading... |
117 absRect.moveBy(delta); | 117 absRect.moveBy(delta); |
118 | 118 |
119 if (absRect.isEmpty()) | 119 if (absRect.isEmpty()) |
120 return; | 120 return; |
121 | 121 |
122 RenderView* view = m_renderer.view(); | 122 RenderView* view = m_renderer.view(); |
123 if (view) | 123 if (view) |
124 view->repaintViewRectangle(absRect); | 124 view->repaintViewRectangle(absRect); |
125 return; | 125 return; |
126 } | 126 } |
127 IntRect repaintRect = pixelSnappedIntRect(r); | |
128 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squasphing-agnostic. | 127 // FIXME: generalize accessors to backing GraphicsLayers so that this code i
s squasphing-agnostic. |
129 if (m_renderer.layer()->groupedMapping()) { | 128 if (m_renderer.layer()->groupedMapping()) { |
| 129 LayoutRect repaintRect = r; |
| 130 repaintRect.move(m_renderer.layer()->subpixelAccumulation()); |
130 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()
->squashingLayer()) | 131 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping()
->squashingLayer()) |
131 squashingLayer->setNeedsDisplayInRect(repaintRect); | 132 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(repaintRec
t)); |
132 } else { | 133 } else { |
133 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe
ct(repaintRect); | 134 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe
ct(r); |
134 } | 135 } |
135 } | 136 } |
136 | 137 |
137 void RenderLayerRepainter::setFilterBackendNeedsRepaintingInRect(const LayoutRec
t& rect) | 138 void RenderLayerRepainter::setFilterBackendNeedsRepaintingInRect(const LayoutRec
t& rect) |
138 { | 139 { |
139 if (rect.isEmpty()) | 140 if (rect.isEmpty()) |
140 return; | 141 return; |
141 LayoutRect rectForRepaint = rect; | 142 LayoutRect rectForRepaint = rect; |
142 m_renderer.style()->filterOutsets().expandRect(rectForRepaint); | 143 m_renderer.style()->filterOutsets().expandRect(rectForRepaint); |
143 | 144 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const | 176 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const |
176 { | 177 { |
177 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { | 178 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent
()) { |
178 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) | 179 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter
s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) |
179 return const_cast<RenderLayer*>(curr); | 180 return const_cast<RenderLayer*>(curr); |
180 } | 181 } |
181 return 0; | 182 return 0; |
182 } | 183 } |
183 | 184 |
184 } // Namespace WebCore | 185 } // Namespace WebCore |
OLD | NEW |