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

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

Issue 27030009: Revert "Make compositingState explicit (re-land #2 with bogus ASSERT removed)" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix build error Created 7 years, 2 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/rendering/RenderLayerCompositor.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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 inline bool RenderLayerRepainter::shouldRepaintAfterLayout() const 120 inline bool RenderLayerRepainter::shouldRepaintAfterLayout() const
121 { 121 {
122 if (m_repaintStatus == NeedsNormalRepaint) 122 if (m_repaintStatus == NeedsNormalRepaint)
123 return true; 123 return true;
124 124
125 // Composited layers that were moved during a positioned movement only 125 // Composited layers that were moved during a positioned movement only
126 // layout, don't need to be repainted. They just need to be recomposited. 126 // layout, don't need to be repainted. They just need to be recomposited.
127 ASSERT(m_repaintStatus == NeedsFullRepaintForPositionedMovementLayout); 127 ASSERT(m_repaintStatus == NeedsFullRepaintForPositionedMovementLayout);
128 return m_renderer->compositingState() != PaintsIntoOwnBacking; 128 return !m_renderer->isComposited() || (m_renderer->isComposited() && m_rende rer->layer()->compositedLayerMapping()->paintsIntoCompositedAncestor());
129 } 129 }
130 130
131 // Since we're only painting non-composited layers, we know that they all share the same repaintContainer. 131 // Since we're only painting non-composited layers, we know that they all share the same repaintContainer.
132 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants(RenderLayer ModelObject* repaintContainer) 132 void RenderLayerRepainter::repaintIncludingNonCompositingDescendants(RenderLayer ModelObject* repaintContainer)
133 { 133 {
134 m_renderer->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_re nderer->clippedOverflowRectForRepaint(repaintContainer))); 134 m_renderer->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_re nderer->clippedOverflowRectForRepaint(repaintContainer)));
135 135
136 for (RenderLayer* curr = m_renderer->layer()->firstChild(); curr; curr = cur r->nextSibling()) { 136 for (RenderLayer* curr = m_renderer->layer()->firstChild(); curr; curr = cur r->nextSibling()) {
137 if (!curr->compositedLayerMapping()) 137 if (!curr->isComposited())
138 curr->repainter().repaintIncludingNonCompositingDescendants(repaintC ontainer); 138 curr->repainter().repaintIncludingNonCompositingDescendants(repaintC ontainer);
139 } 139 }
140 } 140 }
141 141
142 LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants() const 142 LayoutRect RenderLayerRepainter::repaintRectIncludingNonCompositingDescendants() const
143 { 143 {
144 LayoutRect repaintRect = m_repaintRect; 144 LayoutRect repaintRect = m_repaintRect;
145 for (RenderLayer* child = m_renderer->layer()->firstChild(); child; child = child->nextSibling()) { 145 for (RenderLayer* child = m_renderer->layer()->firstChild(); child; child = child->nextSibling()) {
146 // Don't include repaint rects for composited child layers; they will pa int themselves and have a different origin. 146 // Don't include repaint rects for composited child layers; they will pa int themselves and have a different origin.
147 if (child->compositedLayerMapping()) 147 if (child->isComposited())
148 continue; 148 continue;
149 149
150 repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingD escendants()); 150 repaintRect.unite(child->repainter().repaintRectIncludingNonCompositingD escendants());
151 } 151 }
152 return repaintRect; 152 return repaintRect;
153 } 153 }
154 154
155 } // Namespace WebCore 155 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698