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

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

Issue 2671853003: [SPInvalidation] Use GeometryMapper in PaintLayerClipper for paint. (Closed)
Patch Set: Merge branch 'master' into paintlayerclipper Created 3 years, 10 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 150 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
151 properties.unclippedAbsoluteBoundingBox = 151 properties.unclippedAbsoluteBoundingBox =
152 enclosingIntRect(m_geometryMap.absoluteRect( 152 enclosingIntRect(m_geometryMap.absoluteRect(
153 FloatRect(layer->boundingBoxForCompositingOverlapTest()))); 153 FloatRect(layer->boundingBoxForCompositingOverlapTest())));
154 // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very little 154 // FIXME: Setting the absBounds to 1x1 instead of 0x0 makes very little
155 // sense, but removing this code will make JSGameBench sad. 155 // sense, but removing this code will make JSGameBench sad.
156 // See https://codereview.chromium.org/13912020/ 156 // See https://codereview.chromium.org/13912020/
157 if (properties.unclippedAbsoluteBoundingBox.isEmpty()) 157 if (properties.unclippedAbsoluteBoundingBox.isEmpty())
158 properties.unclippedAbsoluteBoundingBox.setSize(IntSize(1, 1)); 158 properties.unclippedAbsoluteBoundingBox.setSize(IntSize(1, 1));
159 159
160 IntRect clipRect = 160 IntRect clipRect = pixelSnappedIntRect(
161 pixelSnappedIntRect(layer->clipper() 161 layer->clipper(PaintLayer::DoNotUseGeometryMapper)
162 .backgroundClipRect(ClipRectsContext( 162 .backgroundClipRect(
163 m_rootLayer, AbsoluteClipRects)) 163 ClipRectsContext(m_rootLayer, AbsoluteClipRects))
164 .rect()); 164 .rect());
165 properties.clippedAbsoluteBoundingBox = 165 properties.clippedAbsoluteBoundingBox =
166 properties.unclippedAbsoluteBoundingBox; 166 properties.unclippedAbsoluteBoundingBox;
167 properties.clippedAbsoluteBoundingBox.intersect(clipRect); 167 properties.clippedAbsoluteBoundingBox.intersect(clipRect);
168 } 168 }
169 169
170 const PaintLayer* parent = layer->parent(); 170 const PaintLayer* parent = layer->parent();
171 properties.opacityAncestor = 171 properties.opacityAncestor =
172 parent->isTransparent() ? parent : parent->opacityAncestor(); 172 parent->isTransparent() ? parent : parent->opacityAncestor();
173 properties.transformAncestor = 173 properties.transformAncestor =
174 parent->transform() ? parent : parent->transformAncestor(); 174 parent->transform() ? parent : parent->transformAncestor();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 ASSERT(!layer->needsCompositingInputsUpdate()); 268 ASSERT(!layer->needsCompositingInputsUpdate());
269 269
270 for (PaintLayer* child = layer->firstChild(); child; 270 for (PaintLayer* child = layer->firstChild(); child;
271 child = child->nextSibling()) 271 child = child->nextSibling())
272 assertNeedsCompositingInputsUpdateBitsCleared(child); 272 assertNeedsCompositingInputsUpdateBitsCleared(child);
273 } 273 }
274 274
275 #endif 275 #endif
276 276
277 } // namespace blink 277 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698