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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp

Issue 2743733004: Revert of Reduce copying of local data structures in GeometryMapper and PaintLayerClipper. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/compositing/CompositingInputsUpdater.h" 5 #include "core/layout/compositing/CompositingInputsUpdater.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/FrameHost.h" 8 #include "core/frame/FrameHost.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/layout/LayoutBlock.h" 10 #include "core/layout/LayoutBlock.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 154 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
155 properties.unclippedAbsoluteBoundingBox = 155 properties.unclippedAbsoluteBoundingBox =
156 enclosingIntRect(m_geometryMap.absoluteRect( 156 enclosingIntRect(m_geometryMap.absoluteRect(
157 FloatRect(layer->boundingBoxForCompositingOverlapTest()))); 157 FloatRect(layer->boundingBoxForCompositingOverlapTest())));
158 // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very little 158 // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very little
159 // sense, but removing this code will make JSGameBench sad. 159 // sense, but removing this code will make JSGameBench sad.
160 // See https://codereview.chromium.org/13912020/ 160 // See https://codereview.chromium.org/13912020/
161 if (properties.unclippedAbsoluteBoundingBox.isEmpty()) 161 if (properties.unclippedAbsoluteBoundingBox.isEmpty())
162 properties.unclippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); 162 properties.unclippedAbsoluteBoundingBox.setSize(IntSize(1, 1));
163 163
164 ClipRect clipRect; 164 IntRect clipRect = pixelSnappedIntRect(
165 layer->clipper(PaintLayer::DoNotUseGeometryMapper) 165 layer->clipper(PaintLayer::DoNotUseGeometryMapper)
166 .calculateBackgroundClipRect( 166 .backgroundClipRect(
167 ClipRectsContext(m_rootLayer, AbsoluteClipRects), clipRect); 167 ClipRectsContext(m_rootLayer, AbsoluteClipRects))
168 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect()); 168 .rect());
169 properties.clippedAbsoluteBoundingBox = 169 properties.clippedAbsoluteBoundingBox =
170 properties.unclippedAbsoluteBoundingBox; 170 properties.unclippedAbsoluteBoundingBox;
171 properties.clippedAbsoluteBoundingBox.intersect(snappedClipRect); 171 properties.clippedAbsoluteBoundingBox.intersect(clipRect);
172 } 172 }
173 173
174 const PaintLayer* parent = layer->parent(); 174 const PaintLayer* parent = layer->parent();
175 properties.opacityAncestor = 175 properties.opacityAncestor =
176 parent->isTransparent() ? parent : parent->opacityAncestor(); 176 parent->isTransparent() ? parent : parent->opacityAncestor();
177 properties.transformAncestor = 177 properties.transformAncestor =
178 parent->transform() ? parent : parent->transformAncestor(); 178 parent->transform() ? parent : parent->transformAncestor();
179 properties.filterAncestor = parent->hasFilterInducingProperty() 179 properties.filterAncestor = parent->hasFilterInducingProperty()
180 ? parent 180 ? parent
181 : parent->filterAncestor(); 181 : parent->filterAncestor();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 ASSERT(!layer->needsCompositingInputsUpdate()); 272 ASSERT(!layer->needsCompositingInputsUpdate());
273 273
274 for (PaintLayer* child = layer->firstChild(); child; 274 for (PaintLayer* child = layer->firstChild(); child;
275 child = child->nextSibling()) 275 child = child->nextSibling())
276 assertNeedsCompositingInputsUpdateBitsCleared(child); 276 assertNeedsCompositingInputsUpdateBitsCleared(child);
277 } 277 }
278 278
279 #endif 279 #endif
280 280
281 } // namespace blink 281 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698