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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 | 362 |
363 if (updateForegroundLayer(compositor->needsContentsCompositingLayer(&m_ownin
gLayer))) | 363 if (updateForegroundLayer(compositor->needsContentsCompositingLayer(&m_ownin
gLayer))) |
364 layerConfigChanged = true; | 364 layerConfigChanged = true; |
365 | 365 |
366 bool needsDescendantsClippingLayer = compositor->clipsCompositingDescendants
(&m_owningLayer); | 366 bool needsDescendantsClippingLayer = compositor->clipsCompositingDescendants
(&m_owningLayer); |
367 | 367 |
368 // Our scrolling layer will clip. | 368 // Our scrolling layer will clip. |
369 if (m_owningLayer.needsCompositedScrolling()) | 369 if (m_owningLayer.needsCompositedScrolling()) |
370 needsDescendantsClippingLayer = false; | 370 needsDescendantsClippingLayer = false; |
371 | 371 |
372 RenderLayer* scrollParent = compositor->acceleratedCompositingForOverflowScr
ollEnabled() ? m_owningLayer.scrollParent() : 0; | 372 RenderLayer* scrollParent = compositor->preferCompositingToLCDTextEnabled()
? m_owningLayer.scrollParent() : 0; |
373 | 373 |
374 // This is required because compositing layers are parented | 374 // This is required because compositing layers are parented |
375 // according to the z-order hierarchy, yet clipping goes down the renderer h
ierarchy. | 375 // according to the z-order hierarchy, yet clipping goes down the renderer h
ierarchy. |
376 // Thus, a RenderLayer can be clipped by a RenderLayer that is an ancestor i
n the renderer hierarchy, | 376 // Thus, a RenderLayer can be clipped by a RenderLayer that is an ancestor i
n the renderer hierarchy, |
377 // but a sibling in the z-order hierarchy. Further, that sibling need not be
composited at all. | 377 // but a sibling in the z-order hierarchy. Further, that sibling need not be
composited at all. |
378 // In such scenarios, an ancestor clipping layer is necessary to apply the c
omposited clip for this layer. | 378 // In such scenarios, an ancestor clipping layer is necessary to apply the c
omposited clip for this layer. |
379 bool needsAncestorClip = owningLayerClippedByLayerNotAboveCompositedAncestor
(); | 379 bool needsAncestorClip = owningLayerClippedByLayerNotAboveCompositedAncestor
(); |
380 | 380 |
381 if (scrollParent) { | 381 if (scrollParent) { |
382 // If our containing block is our ancestor scrolling layer, then we'll a
lready be clipped | 382 // If our containing block is our ancestor scrolling layer, then we'll a
lready be clipped |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 } | 664 } |
665 | 665 |
666 updateContentsRect(); | 666 updateContentsRect(); |
667 updateBackgroundColor(); | 667 updateBackgroundColor(); |
668 updateDrawsContent(); | 668 updateDrawsContent(); |
669 updateContentsOpaque(); | 669 updateContentsOpaque(); |
670 updateAfterWidgetResize(); | 670 updateAfterWidgetResize(); |
671 updateRenderingContext(); | 671 updateRenderingContext(); |
672 updateShouldFlattenTransform(); | 672 updateShouldFlattenTransform(); |
673 updateChildrenTransform(); | 673 updateChildrenTransform(); |
674 updateScrollParent(compositor()->acceleratedCompositingForOverflowScrollEnab
led() ? m_owningLayer.scrollParent() : 0); | 674 updateScrollParent(compositor()->preferCompositingToLCDTextEnabled() ? m_own
ingLayer.scrollParent() : 0); |
675 registerScrollingLayers(); | 675 registerScrollingLayers(); |
676 | 676 |
677 updateCompositingReasons(); | 677 updateCompositingReasons(); |
678 } | 678 } |
679 | 679 |
680 void CompositedLayerMapping::updateMainGraphicsLayerGeometry(const IntRect& rela
tiveCompositingBounds, const IntRect& localCompositingBounds, IntPoint& graphics
LayerParentLocation) | 680 void CompositedLayerMapping::updateMainGraphicsLayerGeometry(const IntRect& rela
tiveCompositingBounds, const IntRect& localCompositingBounds, IntPoint& graphics
LayerParentLocation) |
681 { | 681 { |
682 m_graphicsLayer->setPosition(FloatPoint(relativeCompositingBounds.location()
- graphicsLayerParentLocation)); | 682 m_graphicsLayer->setPosition(FloatPoint(relativeCompositingBounds.location()
- graphicsLayerParentLocation)); |
683 m_graphicsLayer->setOffsetFromRenderer(toIntSize(localCompositingBounds.loca
tion())); | 683 m_graphicsLayer->setOffsetFromRenderer(toIntSize(localCompositingBounds.loca
tion())); |
684 | 684 |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2278 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2278 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
2279 name = "Scrolling Block Selection Layer"; | 2279 name = "Scrolling Block Selection Layer"; |
2280 } else { | 2280 } else { |
2281 ASSERT_NOT_REACHED(); | 2281 ASSERT_NOT_REACHED(); |
2282 } | 2282 } |
2283 | 2283 |
2284 return name; | 2284 return name; |
2285 } | 2285 } |
2286 | 2286 |
2287 } // namespace blink | 2287 } // namespace blink |
OLD | NEW |