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

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

Issue 473093002: Revert "Re-land of: Allow paint invalidation containers to cross frame boundaries." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile error Created 6 years, 4 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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 repaintRect.unite(child->paintInvalidator().repaintRectIncludingNonCompo sitingDescendants()); 103 repaintRect.unite(child->paintInvalidator().repaintRectIncludingNonCompo sitingDescendants());
104 } 104 }
105 return repaintRect; 105 return repaintRect;
106 } 106 }
107 107
108 void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& r) 108 void RenderLayerRepainter::setBackingNeedsRepaintInRect(const LayoutRect& 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 if (m_renderer.compositingState() == NotComposited) {
114 // If we're trying to repaint the placeholder document layer, propagate the
115 // repaint to the native view system.
116 LayoutRect absRect(r);
117 LayoutPoint delta;
118 m_renderer.layer()->convertToLayerCoords(m_renderer.layer()->root(), del ta);
119 absRect.moveBy(delta);
120
121 if (absRect.isEmpty())
122 return;
123
124 RenderView* view = m_renderer.view();
125 if (view)
126 view->invalidatePaintForRectangle(absRect);
127 return;
128 }
113 // FIXME: generalize accessors to backing GraphicsLayers so that this code i s squasphing-agnostic. 129 // FIXME: generalize accessors to backing GraphicsLayers so that this code i s squasphing-agnostic.
114 if (m_renderer.layer()->groupedMapping()) { 130 if (m_renderer.layer()->groupedMapping()) {
115 LayoutRect repaintRect = r; 131 LayoutRect repaintRect = r;
116 repaintRect.move(m_renderer.layer()->subpixelAccumulation()); 132 repaintRect.move(m_renderer.layer()->subpixelAccumulation());
117 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping() ->squashingLayer()) 133 if (GraphicsLayer* squashingLayer = m_renderer.layer()->groupedMapping() ->squashingLayer())
118 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(repaintRec t)); 134 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(repaintRec t));
119 } else { 135 } else {
120 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe ct(r); 136 m_renderer.layer()->compositedLayerMapping()->setContentsNeedDisplayInRe ct(r);
121 } 137 }
122 } 138 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const 176 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const
161 { 177 {
162 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent ()) { 178 for (const RenderLayer* curr = m_renderer.layer(); curr; curr = curr->parent ()) {
163 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())
164 return const_cast<RenderLayer*>(curr); 180 return const_cast<RenderLayer*>(curr);
165 } 181 }
166 return 0; 182 return 0;
167 } 183 }
168 184
169 } // namespace blink 185 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698