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

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

Issue 160903002: Move RenderLayer repainting to repaint-after-layout framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Rebase to master Created 6 years, 9 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
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerRepainter.cpp » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. 7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 RenderObject::styleDidChange(diff, oldStyle); 144 RenderObject::styleDidChange(diff, oldStyle);
145 updateFromStyle(); 145 updateFromStyle();
146 146
147 LayerType type = layerTypeRequired(); 147 LayerType type = layerTypeRequired();
148 if (type != NoLayer) { 148 if (type != NoLayer) {
149 if (!layer() && layerCreationAllowedForSubtree()) { 149 if (!layer() && layerCreationAllowedForSubtree()) {
150 if (s_wasFloating && isFloating()) 150 if (s_wasFloating && isFloating())
151 setChildNeedsLayout(); 151 setChildNeedsLayout();
152 createLayer(type); 152 createLayer(type);
153 if (parent() && !needsLayout() && containingBlock()) { 153 if (parent() && !needsLayout() && containingBlock()) {
154 layer()->repainter().setRepaintStatus(NeedsFullRepaint); 154 // FIXME: This invalidation is overly broad. We should update to
155 // do the correct invalidation at RenderStyle::diff time. crbug. com/349061
156 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
157 layer()->renderer()->setShouldDoFullRepaintAfterLayout(true) ;
158 else
159 layer()->repainter().setRepaintStatus(NeedsFullRepaint);
155 // There is only one layer to update, it is not worth using |cac hedOffset| since 160 // There is only one layer to update, it is not worth using |cac hedOffset| since
156 // we are not sure the value will be used. 161 // we are not sure the value will be used.
157 layer()->updateLayerPositions(0); 162 layer()->updateLayerPositions(0);
158 } 163 }
159 } 164 }
160 } else if (layer() && layer()->parent()) { 165 } else if (layer() && layer()->parent()) {
161 setHasTransform(false); // Either a transform wasn't specified or the ob ject doesn't support transforms, so just null out the bit. 166 setHasTransform(false); // Either a transform wasn't specified or the ob ject doesn't support transforms, so just null out the bit.
162 setHasReflection(false); 167 setHasReflection(false);
163 layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_l ayer 168 layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_l ayer
164 if (s_wasFloating && isFloating()) 169 if (s_wasFloating && isFloating())
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 return m_layer ? m_layer->hasCompositedLayerMapping() : false; 222 return m_layer ? m_layer->hasCompositedLayerMapping() : false;
218 } 223 }
219 224
220 CompositedLayerMapping* RenderLayerModelObject::groupedMapping() const 225 CompositedLayerMapping* RenderLayerModelObject::groupedMapping() const
221 { 226 {
222 return m_layer ? m_layer->groupedMapping() : 0; 227 return m_layer ? m_layer->groupedMapping() : 0;
223 } 228 }
224 229
225 } // namespace WebCore 230 } // namespace WebCore
226 231
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerRepainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698