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

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

Issue 474793002: Add GraphicsLayerDebugInfo::includesNewPaintInvalidation to distinguish paint from new RenderObjects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review Created 6 years, 3 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool firstPaint = !m_renderer.hadPaintInvalidation();
115 m_renderer.setHadPaintInvalidation();
116
113 // FIXME: generalize accessors to backing GraphicsLayers so that this code i s squashing-agnostic. 117 // FIXME: generalize accessors to backing GraphicsLayers so that this code i s squashing-agnostic.
114 if (m_renderer.layer()->groupedMapping()) { 118 if (m_renderer.layer()->groupedMapping()) {
115 LayoutRect paintInvalidationRect = r; 119 LayoutRect paintInvalidationRect = r;
116 paintInvalidationRect.move(m_renderer.layer()->subpixelAccumulation()); 120 paintInvalidationRect.move(m_renderer.layer()->subpixelAccumulation());
117 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping() ->squashingLayer()) 121 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping() ->squashingLayer()) {
118 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval idationRect)); 122 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval idationRect));
123 if (firstPaint)
124 squashingLayer->setIncludesFirstPaintInvalidation();
125 }
119 } else { 126 } else {
120 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe ct(r); 127 CompositedLayerMapping* mapping = m_renderer.layer()->compositedLayerMap ping();
128 ASSERT(mapping);
129 mapping->setContentsNeedDisplayInRect(r);
130 if (firstPaint)
131 mapping->mainGraphicsLayer()->setIncludesFirstPaintInvalidation();
121 } 132 }
122 } 133 }
123 134
124 void RenderLayerRepainter::setFilterBackendNeedsPaintInvalidationInRect(const La youtRect& rect) 135 void RenderLayerRepainter::setFilterBackendNeedsPaintInvalidationInRect(const La youtRect& rect)
125 { 136 {
126 if (rect.isEmpty()) 137 if (rect.isEmpty())
127 return; 138 return;
128 LayoutRect rectForPaintInvalidation = rect; 139 LayoutRect rectForPaintInvalidation = rect;
129 140
130 ASSERT(m_renderer.layer()->filterInfo()); 141 ASSERT(m_renderer.layer()->filterInfo());
(...skipping 28 matching lines...) Expand all
159 RenderLayer* RenderLayerRepainter::enclosingFilterPaintInvalidationLayer() const 170 RenderLayer* RenderLayerRepainter::enclosingFilterPaintInvalidationLayer() const
160 { 171 {
161 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent ()) { 172 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()) 173 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer())
163 return const_cast<RenderLayer*>(curr); 174 return const_cast<RenderLayer*>(curr);
164 } 175 }
165 return 0; 176 return 0;
166 } 177 }
167 178
168 } // namespace blink 179 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderMultiColumnSet.h » ('j') | Source/core/rendering/RenderObject.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698