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

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

Issue 337793004: Repaint squashing content in cases where the entire frame is repainting. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merged. 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 for (RenderLayer* child = m_renderer.layer()->firstChild(); child; child = c hild->nextSibling()) { 177 for (RenderLayer* child = m_renderer.layer()->firstChild(); child; child = c hild->nextSibling()) {
178 // Don't include repaint rects for composited child layers; they will pa int themselves and have a different origin. 178 // Don't include repaint rects for composited child layers; they will pa int themselves and have a different origin.
179 if (child->compositingState() == PaintsIntoOwnBacking || child->composit ingState() == PaintsIntoGroupedBacking) 179 if (child->compositingState() == PaintsIntoOwnBacking || child->composit ingState() == PaintsIntoGroupedBacking)
180 continue; 180 continue;
181 181
182 repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingD escendants()); 182 repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingD escendants());
183 } 183 }
184 return repaintRect; 184 return repaintRect;
185 } 185 }
186 186
187 void RenderLayerRepainter::setBackingNeedsRepaint()
188 {
189 // There is only one call site, and that call site ensures that the composit ing state is PaintsIntoOwnBacking.
190 ASSERT(m_renderer.compositingState() == PaintsIntoOwnBacking);
191
192 m_renderer.compositedLayerMapping()->setContentsNeedDisplay();
193 }
194
195 void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r) 187 void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r)
196 { 188 {
197 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here, 189 // https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
198 // so assert but check that the layer is composited. 190 // so assert but check that the layer is composited.
199 ASSERT(m_renderer.compositingState() != NotComposited); 191 ASSERT(m_renderer.compositingState() != NotComposited);
200 if (m_renderer.compositingState() == NotComposited) { 192 if (m_renderer.compositingState() == NotComposited) {
201 // If we're trying to repaint the placeholder document layer, propagate the 193 // If we're trying to repaint the placeholder document layer, propagate the
202 // repaint to the native view system. 194 // repaint to the native view system.
203 LayoutRect absRect(r); 195 LayoutRect absRect(r);
204 LayoutPoint delta; 196 LayoutPoint delta;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const 256 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const
265 { 257 {
266 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent ()) { 258 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()) 259 if ((curr != m_renderer.layer() && curr->requiresFullLayerImageForFilter s()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer())
268 return const_cast<RenderLayer*>(curr); 260 return const_cast<RenderLayer*>(curr);
269 } 261 }
270 return 0; 262 return 0;
271 } 263 }
272 264
273 } // Namespace WebCore 265 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerRepainter.h ('k') | Source/core/rendering/compositing/CompositedLayerMapping.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698