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

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

Issue 208143003: Issue trace events to gather repaint information. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 ASSERT(!view->layoutStateEnabled()); 75 ASSERT(!view->layoutStateEnabled());
76 76
77 RenderLayerModelObject* repaintContainer = m_renderer->containerForRepai nt(); 77 RenderLayerModelObject* repaintContainer = m_renderer->containerForRepai nt();
78 LayoutRect oldRepaintRect = m_repaintRect; 78 LayoutRect oldRepaintRect = m_repaintRect;
79 computeRepaintRects(repaintContainer, geometryMap); 79 computeRepaintRects(repaintContainer, geometryMap);
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, pixelSna ppedIntRect(oldRepaintRect)); 85 m_renderer->repaintUsingContainer(repaintContainer, pixelSna ppedIntRect(oldRepaintRect), InvalidationLayer);
86 if (m_repaintRect != oldRepaintRect) 86 if (m_repaintRect != oldRepaintRect)
87 m_renderer->repaintUsingContainer(repaintContainer, pixe lSnappedIntRect(m_repaintRect)); 87 m_renderer->repaintUsingContainer(repaintContainer, pixe lSnappedIntRect(m_repaintRect), InvalidationLayer);
88 } else { 88 } else {
89 m_renderer->repaintAfterLayoutIfNeeded(repaintContainer, m_r enderer->selfNeedsLayout(), oldRepaintRect, &m_repaintRect); 89 m_renderer->repaintAfterLayoutIfNeeded(repaintContainer, m_r enderer->selfNeedsLayout(), oldRepaintRect, &m_repaintRect);
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;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return true; 144 return true;
145 145
146 // Composited layers that were moved during a positioned movement only 146 // Composited layers that were moved during a positioned movement only
147 // layout, don't need to be repainted. They just need to be recomposited. 147 // layout, don't need to be repainted. They just need to be recomposited.
148 return m_renderer->compositingState() != PaintsIntoOwnBacking; 148 return m_renderer->compositingState() != PaintsIntoOwnBacking;
149 } 149 }
150 150
151 // Since we're only painting non-composited layers, we know that they all share the same repaintContainer. 151 // Since we're only painting non-composited layers, we know that they all share the same repaintContainer.
152 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants(RenderLayer ModelObject* repaintContainer) 152 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants(RenderLayer ModelObject* repaintContainer)
153 { 153 {
154 m_renderer->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_re nderer->clippedOverflowRectForRepaint(repaintContainer))); 154 m_renderer->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_re nderer->clippedOverflowRectForRepaint(repaintContainer)), InvalidationLayer);
155 155
156 for (RenderLayer* curr = m_renderer->layer()->firstChild(); curr; curr = cur r->nextSibling()) { 156 for (RenderLayer* curr = m_renderer->layer()->firstChild(); curr; curr = cur r->nextSibling()) {
157 if (!curr->hasCompositedLayerMapping()) 157 if (!curr->hasCompositedLayerMapping())
158 curr->repainter().repaintIncludingNonCompositingDescendants(repaintC ontainer); 158 curr->repainter().repaintIncludingNonCompositingDescendants(repaintC ontainer);
159 } 159 }
160 } 160 }
161 161
162 LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants() const 162 LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants() const
163 { 163 {
164 LayoutRect repaintRect; 164 LayoutRect repaintRect;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const 275 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const
276 { 276 {
277 for (const RenderLayer* curr = m_renderer->layer(); curr; curr = curr->paren t()) { 277 for (const RenderLayer* curr = m_renderer->layer(); curr; curr = curr->paren t()) {
278 if ((curr != m_renderer->layer() && curr->requiresFullLayerImageForFilte rs()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer() ) 278 if ((curr != m_renderer->layer() && curr->requiresFullLayerImageForFilte rs()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer() )
279 return const_cast<RenderLayer*>(curr); 279 return const_cast<RenderLayer*>(curr);
280 } 280 }
281 return 0; 281 return 0;
282 } 282 }
283 283
284 } // Namespace WebCore 284 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFrameSet.cpp ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698