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

Side by Side Diff: sky/engine/core/rendering/RenderLayerModelObject.cpp

Issue 791023006: Delete invalidateTreeIfNeeded. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove unneeded call Created 5 years, 11 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 bool hadTransform = hasTransform(); 91 bool hadTransform = hasTransform();
92 92
93 RenderObject::styleDidChange(diff, oldStyle); 93 RenderObject::styleDidChange(diff, oldStyle);
94 updateFromStyle(); 94 updateFromStyle();
95 95
96 LayerType type = layerTypeRequired(); 96 LayerType type = layerTypeRequired();
97 if (type != NoLayer) { 97 if (type != NoLayer) {
98 if (!layer()) { 98 if (!layer()) {
99 createLayer(type); 99 createLayer(type);
100 if (parent() && !needsLayout()) { 100 if (parent() && !needsLayout()) {
101 // FIXME: This invalidation is overly broad. We should update to
102 // do the correct invalidation at RenderStyle::diff time. crbug. com/349061
103 layer()->renderer()->setShouldDoFullPaintInvalidation(true);
104 // FIXME: We should call a specialized version of this function. 101 // FIXME: We should call a specialized version of this function.
105 layer()->updateLayerPositionsAfterLayout(); 102 layer()->updateLayerPositionsAfterLayout();
106 } 103 }
107 } 104 }
108 } else if (layer() && layer()->parent()) { 105 } else if (layer() && layer()->parent()) {
109 setHasTransform(false); // Either a transform wasn't specified or the ob ject doesn't support transforms, so just null out the bit. 106 setHasTransform(false); // Either a transform wasn't specified or the ob ject doesn't support transforms, so just null out the bit.
110 layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_l ayer 107 layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_l ayer
111 if (hadTransform) 108 if (hadTransform)
112 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); 109 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
113 } 110 }
114 111
115 if (layer()) { 112 if (layer()) {
116 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer 113 // FIXME: Ideally we shouldn't need this setter but we can't easily infe r an overflow-only layer
117 // from the style. 114 // from the style.
118 layer()->setLayerType(type); 115 layer()->setLayerType(type);
119 layer()->styleChanged(diff, oldStyle); 116 layer()->styleChanged(diff, oldStyle);
120 } 117 }
121 } 118 }
122 119
123 void RenderLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState & paintInvalidationState)
124 {
125 // FIXME: SVG should probably also go through this unified paint invalidatio n system.
126 ASSERT(!needsLayout());
127
128 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
129 return;
130
131 const RenderLayerModelObject& newPaintInvalidationContainer = *adjustComposi tedContainerForSpecialAncestors(&paintInvalidationState.paintInvalidationContain er());
132 ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation());
133
134 PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, new PaintInvalidationContainer);
135 RenderObject::invalidateTreeIfNeeded(childTreeWalkState);
136 }
137
138 } // namespace blink 120 } // namespace blink
139 121
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayerModelObject.h ('k') | sky/engine/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698