OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 for (size_t i = 0; i < m_squashedLayers.size(); ++i) { | 194 for (size_t i = 0; i < m_squashedLayers.size(); ++i) { |
195 PaintLayer* oldSquashedLayer = m_squashedLayers[i].paintLayer; | 195 PaintLayer* oldSquashedLayer = m_squashedLayers[i].paintLayer; |
196 // Assert on incorrect mappings between layers and groups | 196 // Assert on incorrect mappings between layers and groups |
197 ASSERT(oldSquashedLayer->groupedMapping() == this); | 197 ASSERT(oldSquashedLayer->groupedMapping() == this); |
198 if (oldSquashedLayer->groupedMapping() == this) { | 198 if (oldSquashedLayer->groupedMapping() == this) { |
199 oldSquashedLayer->setGroupedMapping(0, PaintLayer::DoNotInvalidateLa
yerAndRemoveFromMapping); | 199 oldSquashedLayer->setGroupedMapping(0, PaintLayer::DoNotInvalidateLa
yerAndRemoveFromMapping); |
200 oldSquashedLayer->setLostGroupedMapping(true); | 200 oldSquashedLayer->setLostGroupedMapping(true); |
201 } | 201 } |
202 } | 202 } |
203 | 203 |
204 updateClippingLayers(false, false); | 204 updateClippingLayers(false, false, false); |
205 updateOverflowControlsLayers(false, false, false, false); | 205 updateOverflowControlsLayers(false, false, false, false); |
206 updateChildTransformLayer(false); | 206 updateChildTransformLayer(false); |
207 updateForegroundLayer(false); | 207 updateForegroundLayer(false); |
208 updateBackgroundLayer(false); | 208 updateBackgroundLayer(false); |
209 updateMaskLayer(false); | 209 updateMaskLayer(false); |
210 updateChildClippingMaskLayer(false); | 210 updateChildClippingMaskLayer(false); |
211 updateScrollingLayers(false); | 211 updateScrollingLayers(false); |
212 updateSquashingLayers(false); | 212 updateSquashingLayers(false); |
213 destroyGraphicsLayers(); | 213 destroyGraphicsLayers(); |
214 } | 214 } |
(...skipping 21 matching lines...) Expand all Loading... |
236 updateLayerBlendMode(layoutObject()->styleRef()); | 236 updateLayerBlendMode(layoutObject()->styleRef()); |
237 updateIsRootForIsolatedGroup(); | 237 updateIsRootForIsolatedGroup(); |
238 } | 238 } |
239 | 239 |
240 void CompositedLayerMapping::destroyGraphicsLayers() | 240 void CompositedLayerMapping::destroyGraphicsLayers() |
241 { | 241 { |
242 if (m_graphicsLayer) | 242 if (m_graphicsLayer) |
243 m_graphicsLayer->removeFromParent(); | 243 m_graphicsLayer->removeFromParent(); |
244 | 244 |
245 m_ancestorClippingLayer = nullptr; | 245 m_ancestorClippingLayer = nullptr; |
| 246 m_ancestorClippingMaskLayer = nullptr; |
246 m_graphicsLayer = nullptr; | 247 m_graphicsLayer = nullptr; |
247 m_foregroundLayer = nullptr; | 248 m_foregroundLayer = nullptr; |
248 m_backgroundLayer = nullptr; | 249 m_backgroundLayer = nullptr; |
249 m_childContainmentLayer = nullptr; | 250 m_childContainmentLayer = nullptr; |
250 m_childTransformLayer = nullptr; | 251 m_childTransformLayer = nullptr; |
251 m_maskLayer = nullptr; | 252 m_maskLayer = nullptr; |
252 m_childClippingMaskLayer = nullptr; | 253 m_childClippingMaskLayer = nullptr; |
253 | 254 |
254 m_scrollingLayer = nullptr; | 255 m_scrollingLayer = nullptr; |
255 m_scrollingContentsLayer = nullptr; | 256 m_scrollingContentsLayer = nullptr; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 // updateAncestorClippingLayerGeometry will fail as the clip rect will be | 408 // updateAncestorClippingLayerGeometry will fail as the clip rect will be |
408 // infinite. | 409 // infinite. |
409 // FIXME: this should use cached clip rects, but this sometimes give | 410 // FIXME: this should use cached clip rects, but this sometimes give |
410 // inaccurate results (and trips the ASSERTS in PaintLayerClipper). | 411 // inaccurate results (and trips the ASSERTS in PaintLayerClipper). |
411 ClipRectsContext clipRectsContext(compositingAncestor, UncachedClipRects, Ig
noreOverlayScrollbarSize); | 412 ClipRectsContext clipRectsContext(compositingAncestor, UncachedClipRects, Ig
noreOverlayScrollbarSize); |
412 clipRectsContext.setIgnoreOverflowClip(); | 413 clipRectsContext.setIgnoreOverflowClip(); |
413 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro
undClipRect(clipRectsContext).rect()); | 414 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro
undClipRect(clipRectsContext).rect()); |
414 return parentClipRect != LayoutRect::infiniteIntRect(); | 415 return parentClipRect != LayoutRect::infiniteIntRect(); |
415 } | 416 } |
416 | 417 |
| 418 bool CompositedLayerMapping::owningLayerMaskedByLayerNotAboveCompositedAncestor(
const PaintLayer* scrollParent) |
| 419 { |
| 420 if (!m_owningLayer.parent()) |
| 421 return false; |
| 422 |
| 423 const PaintLayer* compositingAncestor = m_owningLayer.enclosingLayerWithComp
ositedLayerMapping(ExcludeSelf); |
| 424 if (!compositingAncestor) |
| 425 return false; |
| 426 |
| 427 const LayoutObject* clippingContainer = m_owningLayer.clippingContainer(); |
| 428 if (!clippingContainer) |
| 429 return false; |
| 430 |
| 431 if (clippingContainer->enclosingLayer() == scrollParent) |
| 432 return false; |
| 433 |
| 434 if (compositingAncestor->layoutObject()->isDescendantOf(clippingContainer)) |
| 435 return false; |
| 436 |
| 437 DCHECK(clippingContainer->style()); |
| 438 return clippingContainer->style()->clipPath() || clippingContainer->style()-
>hasBorderRadius(); |
| 439 } |
| 440 |
417 const PaintLayer* CompositedLayerMapping::scrollParent() | 441 const PaintLayer* CompositedLayerMapping::scrollParent() |
418 { | 442 { |
419 const PaintLayer* scrollParent = m_owningLayer.scrollParent(); | 443 const PaintLayer* scrollParent = m_owningLayer.scrollParent(); |
420 if (scrollParent && !scrollParent->needsCompositedScrolling()) | 444 if (scrollParent && !scrollParent->needsCompositedScrolling()) |
421 return nullptr; | 445 return nullptr; |
422 return scrollParent; | 446 return scrollParent; |
423 } | 447 } |
424 | 448 |
425 bool CompositedLayerMapping::updateGraphicsLayerConfiguration() | 449 bool CompositedLayerMapping::updateGraphicsLayerConfiguration() |
426 { | 450 { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 | 487 |
464 const PaintLayer* scrollParent = this->scrollParent(); | 488 const PaintLayer* scrollParent = this->scrollParent(); |
465 | 489 |
466 // This is required because compositing layers are parented according to the
z-order hierarchy, yet | 490 // This is required because compositing layers are parented according to the
z-order hierarchy, yet |
467 // clipping goes down the layoutObject hierarchy. Thus, a PaintLayer can be
clipped by a | 491 // clipping goes down the layoutObject hierarchy. Thus, a PaintLayer can be
clipped by a |
468 // PaintLayer that is an ancestor in the layoutObject hierarchy, but a sibli
ng in the z-order | 492 // PaintLayer that is an ancestor in the layoutObject hierarchy, but a sibli
ng in the z-order |
469 // hierarchy. Further, that sibling need not be composited at all. In such s
cenarios, an ancestor | 493 // hierarchy. Further, that sibling need not be composited at all. In such s
cenarios, an ancestor |
470 // clipping layer is necessary to apply the composited clip for this layer. | 494 // clipping layer is necessary to apply the composited clip for this layer. |
471 bool needsAncestorClip = owningLayerClippedByLayerNotAboveCompositedAncestor
(scrollParent) | 495 bool needsAncestorClip = owningLayerClippedByLayerNotAboveCompositedAncestor
(scrollParent) |
472 && !m_owningLayer.clippingContainer()->enclosingLayer()->hasRootScroller
AsDescendant(); | 496 && !m_owningLayer.clippingContainer()->enclosingLayer()->hasRootScroller
AsDescendant(); |
473 | 497 bool needsAncestorClippingMask = needsAncestorClip && owningLayerMaskedByLay
erNotAboveCompositedAncestor(scrollParent); |
474 if (updateClippingLayers(needsAncestorClip, needsDescendantsClippingLayer)) | 498 if (updateClippingLayers(needsAncestorClip, needsAncestorClippingMask, needs
DescendantsClippingLayer)) |
475 layerConfigChanged = true; | 499 layerConfigChanged = true; |
476 | 500 |
477 bool scrollingConfigChanged = false; | 501 bool scrollingConfigChanged = false; |
478 if (updateScrollingLayers(m_owningLayer.needsCompositedScrolling())) { | 502 if (updateScrollingLayers(m_owningLayer.needsCompositedScrolling())) { |
479 layerConfigChanged = true; | 503 layerConfigChanged = true; |
480 scrollingConfigChanged = true; | 504 scrollingConfigChanged = true; |
481 } | 505 } |
482 | 506 |
483 if (updateOverflowControlsLayers(requiresHorizontalScrollbarLayer(), require
sVerticalScrollbarLayer(), requiresScrollCornerLayer(), needsAncestorClip)) | 507 if (updateOverflowControlsLayers(requiresHorizontalScrollbarLayer(), require
sVerticalScrollbarLayer(), requiresScrollCornerLayer(), needsAncestorClip)) |
484 layerConfigChanged = true; | 508 layerConfigChanged = true; |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 | 888 |
865 ClipRectsContext clipRectsContext(compositingContainer, PaintingClipRectsIgn
oringOverflowClip, IgnoreOverlayScrollbarSize); | 889 ClipRectsContext clipRectsContext(compositingContainer, PaintingClipRectsIgn
oringOverflowClip, IgnoreOverlayScrollbarSize); |
866 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro
undClipRect(clipRectsContext).rect()); | 890 IntRect parentClipRect = pixelSnappedIntRect(m_owningLayer.clipper().backgro
undClipRect(clipRectsContext).rect()); |
867 ASSERT(parentClipRect != LayoutRect::infiniteIntRect()); | 891 ASSERT(parentClipRect != LayoutRect::infiniteIntRect()); |
868 m_ancestorClippingLayer->setPosition(FloatPoint(parentClipRect.location() -
graphicsLayerParentLocation)); | 892 m_ancestorClippingLayer->setPosition(FloatPoint(parentClipRect.location() -
graphicsLayerParentLocation)); |
869 m_ancestorClippingLayer->setSize(FloatSize(parentClipRect.size())); | 893 m_ancestorClippingLayer->setSize(FloatSize(parentClipRect.size())); |
870 | 894 |
871 // backgroundRect is relative to compositingContainer, so subtract snappedOf
fsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y to get back t
o local coords. | 895 // backgroundRect is relative to compositingContainer, so subtract snappedOf
fsetFromCompositedAncestor.X/snappedOffsetFromCompositedAncestor.Y to get back t
o local coords. |
872 m_ancestorClippingLayer->setOffsetFromLayoutObject(parentClipRect.location()
- snappedOffsetFromCompositedAncestor); | 896 m_ancestorClippingLayer->setOffsetFromLayoutObject(parentClipRect.location()
- snappedOffsetFromCompositedAncestor); |
873 | 897 |
| 898 if (m_ancestorClippingMaskLayer) { |
| 899 m_ancestorClippingMaskLayer->setPosition(m_ancestorClippingLayer->positi
on()); // TODO(schenney) Don't need this? |
| 900 m_ancestorClippingMaskLayer->setSize(m_ancestorClippingLayer->size()); |
| 901 m_ancestorClippingMaskLayer->setNeedsDisplay(); |
| 902 } |
| 903 |
874 // The primary layer is then parented in, and positioned relative to this cl
ipping layer. | 904 // The primary layer is then parented in, and positioned relative to this cl
ipping layer. |
875 graphicsLayerParentLocation = parentClipRect.location(); | 905 graphicsLayerParentLocation = parentClipRect.location(); |
876 } | 906 } |
877 | 907 |
878 void CompositedLayerMapping::updateOverflowControlsHostLayerGeometry(const Paint
Layer* compositingStackingContext, const PaintLayer* compositingContainer) | 908 void CompositedLayerMapping::updateOverflowControlsHostLayerGeometry(const Paint
Layer* compositingStackingContext, const PaintLayer* compositingContainer) |
879 { | 909 { |
880 if (!m_overflowControlsHostLayer) | 910 if (!m_overflowControlsHostLayer) |
881 return; | 911 return; |
882 | 912 |
883 LayoutPoint hostLayerPosition; | 913 LayoutPoint hostLayerPosition; |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 } | 1318 } |
1289 } | 1319 } |
1290 | 1320 |
1291 // FIXME: we could refine this to only allocate backings for one of these la
yers if possible. | 1321 // FIXME: we could refine this to only allocate backings for one of these la
yers if possible. |
1292 if (m_foregroundLayer) | 1322 if (m_foregroundLayer) |
1293 m_foregroundLayer->setDrawsContent(hasPaintedContent); | 1323 m_foregroundLayer->setDrawsContent(hasPaintedContent); |
1294 | 1324 |
1295 if (m_backgroundLayer) | 1325 if (m_backgroundLayer) |
1296 m_backgroundLayer->setDrawsContent(hasPaintedContent); | 1326 m_backgroundLayer->setDrawsContent(hasPaintedContent); |
1297 | 1327 |
| 1328 if (m_ancestorClippingMaskLayer) |
| 1329 m_ancestorClippingMaskLayer->setDrawsContent(true); |
| 1330 |
1298 if (m_maskLayer) | 1331 if (m_maskLayer) |
1299 m_maskLayer->setDrawsContent(true); | 1332 m_maskLayer->setDrawsContent(true); |
1300 | 1333 |
1301 if (m_childClippingMaskLayer) | 1334 if (m_childClippingMaskLayer) |
1302 m_childClippingMaskLayer->setDrawsContent(true); | 1335 m_childClippingMaskLayer->setDrawsContent(true); |
1303 } | 1336 } |
1304 | 1337 |
1305 void CompositedLayerMapping::updateChildrenTransform() | 1338 void CompositedLayerMapping::updateChildrenTransform() |
1306 { | 1339 { |
1307 if (GraphicsLayer* childTransformLayer = this->childTransformLayer()) { | 1340 if (GraphicsLayer* childTransformLayer = this->childTransformLayer()) { |
1308 childTransformLayer->setTransform(owningLayer().perspectiveTransform()); | 1341 childTransformLayer->setTransform(owningLayer().perspectiveTransform()); |
1309 childTransformLayer->setTransformOrigin(owningLayer().perspectiveOrigin(
)); | 1342 childTransformLayer->setTransformOrigin(owningLayer().perspectiveOrigin(
)); |
1310 } | 1343 } |
1311 | 1344 |
1312 updateShouldFlattenTransform(); | 1345 updateShouldFlattenTransform(); |
1313 } | 1346 } |
1314 | 1347 |
1315 // Return true if the layers changed. | 1348 // Return true if the layers changed. |
1316 bool CompositedLayerMapping::updateClippingLayers(bool needsAncestorClip, bool n
eedsDescendantClip) | 1349 bool CompositedLayerMapping::updateClippingLayers( |
| 1350 bool needsAncestorClip, |
| 1351 bool needsAncestorClippingMask, |
| 1352 bool needsDescendantClip) |
1317 { | 1353 { |
1318 bool layersChanged = false; | 1354 bool layersChanged = false; |
1319 | 1355 |
| 1356 // TODO(schenney) correctly handle change to border radius while still needi
ng ancestor clip |
1320 if (needsAncestorClip) { | 1357 if (needsAncestorClip) { |
1321 if (!m_ancestorClippingLayer) { | 1358 if (!m_ancestorClippingLayer) { |
1322 m_ancestorClippingLayer = createGraphicsLayer(CompositingReasonLayer
ForAncestorClip); | 1359 m_ancestorClippingLayer = createGraphicsLayer(CompositingReasonLayer
ForAncestorClip); |
1323 m_ancestorClippingLayer->setMasksToBounds(true); | 1360 m_ancestorClippingLayer->setMasksToBounds(true); |
1324 m_ancestorClippingLayer->setShouldFlattenTransform(false); | 1361 m_ancestorClippingLayer->setShouldFlattenTransform(false); |
| 1362 if (needsAncestorClippingMask) { |
| 1363 m_ancestorClippingMaskLayer = |
| 1364 createGraphicsLayer(CompositingReasonLayerForAncestorClippin
gMask); |
| 1365 m_ancestorClippingMaskLayer->setPaintingPhase(GraphicsLayerPaint
AncestorClippingMask); |
| 1366 m_ancestorClippingLayer->setMaskLayer(m_ancestorClippingMaskLaye
r.get()); |
| 1367 } |
1325 layersChanged = true; | 1368 layersChanged = true; |
1326 } | 1369 } |
1327 } else if (m_ancestorClippingLayer) { | 1370 } else if (m_ancestorClippingLayer) { |
| 1371 if (m_ancestorClippingMaskLayer) { |
| 1372 m_ancestorClippingMaskLayer->removeFromParent(); |
| 1373 m_ancestorClippingMaskLayer = nullptr; |
| 1374 } |
1328 m_ancestorClippingLayer->removeFromParent(); | 1375 m_ancestorClippingLayer->removeFromParent(); |
1329 m_ancestorClippingLayer = nullptr; | 1376 m_ancestorClippingLayer = nullptr; |
1330 layersChanged = true; | 1377 layersChanged = true; |
1331 } | 1378 } |
1332 | 1379 |
1333 if (needsDescendantClip) { | 1380 if (needsDescendantClip) { |
1334 // We don't need a child containment layer if we're the main frame layou
t view | 1381 // We don't need a child containment layer if we're the main frame layou
t view |
1335 // layer. It's redundant as the frame clip above us will handle this cli
pping. | 1382 // layer. It's redundant as the frame clip above us will handle this cli
pping. |
1336 if (!m_childContainmentLayer && !m_isMainFrameLayoutViewLayer) { | 1383 if (!m_childContainmentLayer && !m_isMainFrameLayoutViewLayer) { |
1337 m_childContainmentLayer = createGraphicsLayer(CompositingReasonLayer
ForDescendantClip); | 1384 m_childContainmentLayer = createGraphicsLayer(CompositingReasonLayer
ForDescendantClip); |
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2470 if (graphicsLayerPaintingPhase & GraphicsLayerPaintBackground) | 2517 if (graphicsLayerPaintingPhase & GraphicsLayerPaintBackground) |
2471 paintLayerFlags |= PaintLayerPaintingCompositingBackgroundPhase; | 2518 paintLayerFlags |= PaintLayerPaintingCompositingBackgroundPhase; |
2472 else | 2519 else |
2473 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; | 2520 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; |
2474 if (graphicsLayerPaintingPhase & GraphicsLayerPaintForeground) | 2521 if (graphicsLayerPaintingPhase & GraphicsLayerPaintForeground) |
2475 paintLayerFlags |= PaintLayerPaintingCompositingForegroundPhase; | 2522 paintLayerFlags |= PaintLayerPaintingCompositingForegroundPhase; |
2476 if (graphicsLayerPaintingPhase & GraphicsLayerPaintMask) | 2523 if (graphicsLayerPaintingPhase & GraphicsLayerPaintMask) |
2477 paintLayerFlags |= PaintLayerPaintingCompositingMaskPhase; | 2524 paintLayerFlags |= PaintLayerPaintingCompositingMaskPhase; |
2478 if (graphicsLayerPaintingPhase & GraphicsLayerPaintChildClippingMask) | 2525 if (graphicsLayerPaintingPhase & GraphicsLayerPaintChildClippingMask) |
2479 paintLayerFlags |= PaintLayerPaintingChildClippingMaskPhase; | 2526 paintLayerFlags |= PaintLayerPaintingChildClippingMaskPhase; |
| 2527 if (graphicsLayerPaintingPhase & GraphicsLayerPaintAncestorClippingMask) |
| 2528 paintLayerFlags |= PaintLayerPaintingAncestorClippingMaskPhase; |
2480 if (graphicsLayerPaintingPhase & GraphicsLayerPaintOverflowContents) | 2529 if (graphicsLayerPaintingPhase & GraphicsLayerPaintOverflowContents) |
2481 paintLayerFlags |= PaintLayerPaintingOverflowContents; | 2530 paintLayerFlags |= PaintLayerPaintingOverflowContents; |
2482 if (graphicsLayerPaintingPhase & GraphicsLayerPaintCompositedScroll) | 2531 if (graphicsLayerPaintingPhase & GraphicsLayerPaintCompositedScroll) |
2483 paintLayerFlags |= PaintLayerPaintingCompositingScrollingPhase; | 2532 paintLayerFlags |= PaintLayerPaintingCompositingScrollingPhase; |
2484 | 2533 |
2485 if (graphicsLayer == m_backgroundLayer.get()) | 2534 if (graphicsLayer == m_backgroundLayer.get()) |
2486 paintLayerFlags |= PaintLayerPaintingRootBackgroundOnly; | 2535 paintLayerFlags |= PaintLayerPaintingRootBackgroundOnly; |
2487 else if (compositor()->fixedRootBackgroundLayer() && m_owningLayer.isRootLay
er()) | 2536 else if (compositor()->fixedRootBackgroundLayer() && m_owningLayer.isRootLay
er()) |
2488 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; | 2537 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; |
2489 | 2538 |
2490 if (graphicsLayer == m_graphicsLayer.get() | 2539 if (graphicsLayer == m_graphicsLayer.get() |
2491 || graphicsLayer == m_foregroundLayer.get() | 2540 || graphicsLayer == m_foregroundLayer.get() |
2492 || graphicsLayer == m_backgroundLayer.get() | 2541 || graphicsLayer == m_backgroundLayer.get() |
2493 || graphicsLayer == m_maskLayer.get() | 2542 || graphicsLayer == m_maskLayer.get() |
2494 || graphicsLayer == m_childClippingMaskLayer.get() | 2543 || graphicsLayer == m_childClippingMaskLayer.get() |
2495 || graphicsLayer == m_scrollingContentsLayer.get()) { | 2544 || graphicsLayer == m_scrollingContentsLayer.get() |
| 2545 || graphicsLayer == m_ancestorClippingMaskLayer.get()) { |
2496 | 2546 |
2497 bool paintRootBackgroundOntoScrollingContentsLayer = m_backgroundPaintsO
ntoScrollingContentsLayer; | 2547 bool paintRootBackgroundOntoScrollingContentsLayer = m_backgroundPaintsO
ntoScrollingContentsLayer; |
2498 DCHECK(!paintRootBackgroundOntoScrollingContentsLayer || (!m_backgroundL
ayer && !m_foregroundLayer)); | 2548 DCHECK(!paintRootBackgroundOntoScrollingContentsLayer || (!m_backgroundL
ayer && !m_foregroundLayer)); |
2499 if (paintRootBackgroundOntoScrollingContentsLayer) { | 2549 if (paintRootBackgroundOntoScrollingContentsLayer) { |
2500 if (graphicsLayer == m_scrollingContentsLayer.get()) | 2550 if (graphicsLayer == m_scrollingContentsLayer.get()) |
2501 paintLayerFlags &= ~PaintLayerPaintingSkipRootBackground; | 2551 paintLayerFlags &= ~PaintLayerPaintingSkipRootBackground; |
2502 else | 2552 else |
2503 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; | 2553 paintLayerFlags |= PaintLayerPaintingSkipRootBackground; |
2504 } | 2554 } |
2505 GraphicsLayerPaintInfo paintInfo; | 2555 GraphicsLayerPaintInfo paintInfo; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2680 { | 2730 { |
2681 String name; | 2731 String name; |
2682 if (graphicsLayer == m_graphicsLayer.get()) { | 2732 if (graphicsLayer == m_graphicsLayer.get()) { |
2683 name = m_owningLayer.debugName(); | 2733 name = m_owningLayer.debugName(); |
2684 } else if (graphicsLayer == m_squashingContainmentLayer.get()) { | 2734 } else if (graphicsLayer == m_squashingContainmentLayer.get()) { |
2685 name = "Squashing Containment Layer"; | 2735 name = "Squashing Containment Layer"; |
2686 } else if (graphicsLayer == m_squashingLayer.get()) { | 2736 } else if (graphicsLayer == m_squashingLayer.get()) { |
2687 name = "Squashing Layer (first squashed layer: " + (m_squashedLayers.siz
e() > 0 ? m_squashedLayers[0].paintLayer->debugName() : "") + ")"; | 2737 name = "Squashing Layer (first squashed layer: " + (m_squashedLayers.siz
e() > 0 ? m_squashedLayers[0].paintLayer->debugName() : "") + ")"; |
2688 } else if (graphicsLayer == m_ancestorClippingLayer.get()) { | 2738 } else if (graphicsLayer == m_ancestorClippingLayer.get()) { |
2689 name = "Ancestor Clipping Layer"; | 2739 name = "Ancestor Clipping Layer"; |
| 2740 } else if (graphicsLayer == m_ancestorClippingMaskLayer.get()) { |
| 2741 name = "Ancestor Clipping Mask Layer"; |
2690 } else if (graphicsLayer == m_foregroundLayer.get()) { | 2742 } else if (graphicsLayer == m_foregroundLayer.get()) { |
2691 name = m_owningLayer.debugName() + " (foreground) Layer"; | 2743 name = m_owningLayer.debugName() + " (foreground) Layer"; |
2692 } else if (graphicsLayer == m_backgroundLayer.get()) { | 2744 } else if (graphicsLayer == m_backgroundLayer.get()) { |
2693 name = m_owningLayer.debugName() + " (background) Layer"; | 2745 name = m_owningLayer.debugName() + " (background) Layer"; |
2694 } else if (graphicsLayer == m_childContainmentLayer.get()) { | 2746 } else if (graphicsLayer == m_childContainmentLayer.get()) { |
2695 name = "Child Containment Layer"; | 2747 name = "Child Containment Layer"; |
2696 } else if (graphicsLayer == m_childTransformLayer.get()) { | 2748 } else if (graphicsLayer == m_childTransformLayer.get()) { |
2697 name = "Child Transform Layer"; | 2749 name = "Child Transform Layer"; |
2698 } else if (graphicsLayer == m_maskLayer.get()) { | 2750 } else if (graphicsLayer == m_maskLayer.get()) { |
2699 name = "Mask Layer"; | 2751 name = "Mask Layer"; |
(...skipping 14 matching lines...) Expand all Loading... |
2714 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2766 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2715 name = "Scrolling Contents Layer"; | 2767 name = "Scrolling Contents Layer"; |
2716 } else { | 2768 } else { |
2717 ASSERT_NOT_REACHED(); | 2769 ASSERT_NOT_REACHED(); |
2718 } | 2770 } |
2719 | 2771 |
2720 return name; | 2772 return name; |
2721 } | 2773 } |
2722 | 2774 |
2723 } // namespace blink | 2775 } // namespace blink |
OLD | NEW |