Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(864)

Side by Side Diff: Source/core/rendering/RenderLayerRepainter.cpp

Issue 318803002: Rename Repaint to Paint Invalidation part 3 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 const RenderLayerModelObject* repaintContainer = m_renderer.containerFor Repaint(); 76 const RenderLayerModelObject* repaintContainer = m_renderer.containerFor Repaint();
77 LayoutRect oldRepaintRect = m_repaintRect; 77 LayoutRect oldRepaintRect = m_repaintRect;
78 LayoutPoint oldOffset = m_offset; 78 LayoutPoint oldOffset = m_offset;
79 computeRepaintRects(); 79 computeRepaintRects();
80 shouldCheckForRepaint &= shouldRepaintLayer(); 80 shouldCheckForRepaint &= shouldRepaintLayer();
81 81
82 if (shouldCheckForRepaint) { 82 if (shouldCheckForRepaint) {
83 if (view && !view->document().printing()) { 83 if (view && !view->document().printing()) {
84 if (m_repaintStatus & NeedsFullRepaint) { 84 if (m_repaintStatus & NeedsFullRepaint) {
85 m_renderer.repaintUsingContainer(repaintContainer, pixelSnap pedIntRect(oldRepaintRect), InvalidationLayer); 85 m_renderer.invalidatePaintUsingContainer(repaintContainer, p ixelSnappedIntRect(oldRepaintRect), InvalidationLayer);
86 if (m_repaintRect != oldRepaintRect) 86 if (m_repaintRect != oldRepaintRect)
87 m_renderer.repaintUsingContainer(repaintContainer, pixel SnappedIntRect(m_repaintRect), InvalidationLayer); 87 m_renderer.invalidatePaintUsingContainer(repaintContaine r, pixelSnappedIntRect(m_repaintRect), InvalidationLayer);
88 } else { 88 } else {
89 m_renderer.repaintAfterLayoutIfNeeded(repaintContainer, m_re nderer.selfNeedsLayout(), oldRepaintRect, oldOffset, &m_repaintRect, &m_offset); 89 m_renderer.invalidatePaintAfterLayoutIfNeeded(repaintContain er, m_renderer.selfNeedsLayout(), oldRepaintRect, oldOffset, &m_repaintRect, &m_ offset);
90 } 90 }
91 } 91 }
92 } 92 }
93 } else { 93 } else {
94 clearRepaintRects(); 94 clearRepaintRects();
95 } 95 }
96 96
97 m_repaintStatus = NeedsNormalRepaint; 97 m_repaintStatus = NeedsNormalRepaint;
98 98
99 } 99 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 // Since we're only painting non-composited layers, we know that they all share the same repaintContainer. 149 // Since we're only painting non-composited layers, we know that they all share the same repaintContainer.
150 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants() 150 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants()
151 { 151 {
152 repaintIncludingNonCompositingDescendantsInternal(m_renderer.containerForRep aint()); 152 repaintIncludingNonCompositingDescendantsInternal(m_renderer.containerForRep aint());
153 } 153 }
154 154
155 void RenderLayerRepainter::repaintIncludingNonCompositingDescendantsInternal(con st RenderLayerModelObject* repaintContainer) 155 void RenderLayerRepainter::repaintIncludingNonCompositingDescendantsInternal(con st RenderLayerModelObject* repaintContainer)
156 { 156 {
157 m_renderer.repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_ren derer.boundsRectForRepaint(repaintContainer)), InvalidationLayer); 157 m_renderer.invalidatePaintUsingContainer(repaintContainer, pixelSnappedIntRe ct(m_renderer.boundsRectForRepaint(repaintContainer)), InvalidationLayer);
158 158
159 // FIXME: Repaints can be issued during style recalc at present, via RenderL ayerModelObject::styleWillChange. This happens in scenarios when 159 // FIXME: Repaints can be issued during style recalc at present, via RenderL ayerModelObject::styleWillChange. This happens in scenarios when
160 // repaint is needed but not layout. 160 // repaint is needed but not layout.
161 DisableCompositingQueryAsserts disabler; 161 DisableCompositingQueryAsserts disabler;
162 162
163 for (RenderLayer* curr = m_renderer.layer()->firstChild(); curr; curr = curr ->nextSibling()) { 163 for (RenderLayer* curr = m_renderer.layer()->firstChild(); curr; curr = curr ->nextSibling()) {
164 if (curr->compositingState() != PaintsIntoOwnBacking && curr->compositin gState() != PaintsIntoGroupedBacking) 164 if (curr->compositingState() != PaintsIntoOwnBacking && curr->compositin gState() != PaintsIntoGroupedBacking)
165 curr->repainter().repaintIncludingNonCompositingDescendantsInternal( repaintContainer); 165 curr->repainter().repaintIncludingNonCompositingDescendantsInternal( repaintContainer);
166 } 166 }
167 } 167 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const 264 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const
265 { 265 {
266 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent ()) { 266 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent ()) {
267 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer()) 267 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer())
268 return const_cast<RenderLayer*>(curr); 268 return const_cast<RenderLayer*>(curr);
269 } 269 }
270 return 0; 270 return 0;
271 } 271 }
272 272
273 } // Namespace WebCore 273 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerModelObject.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698