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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 void createPrimaryGraphicsLayer(); | 369 void createPrimaryGraphicsLayer(); |
370 void destroyGraphicsLayers(); | 370 void destroyGraphicsLayers(); |
371 | 371 |
372 std::unique_ptr<GraphicsLayer> createGraphicsLayer( | 372 std::unique_ptr<GraphicsLayer> createGraphicsLayer( |
373 CompositingReasons, | 373 CompositingReasons, |
374 SquashingDisallowedReasons = SquashingDisallowedReasonsNone); | 374 SquashingDisallowedReasons = SquashingDisallowedReasonsNone); |
375 bool toggleScrollbarLayerIfNeeded(std::unique_ptr<GraphicsLayer>&, | 375 bool toggleScrollbarLayerIfNeeded(std::unique_ptr<GraphicsLayer>&, |
376 bool needsLayer, | 376 bool needsLayer, |
377 CompositingReasons); | 377 CompositingReasons); |
378 | 378 |
379 LayoutBoxModelObject* layoutObject() const { | 379 LayoutBoxModelObject& layoutObject() const { |
380 return m_owningLayer.layoutObject(); | 380 return m_owningLayer.layoutObject(); |
381 } | 381 } |
382 PaintLayerCompositor* compositor() const { | 382 PaintLayerCompositor* compositor() const { |
383 return m_owningLayer.compositor(); | 383 return m_owningLayer.compositor(); |
384 } | 384 } |
385 | 385 |
386 void updateInternalHierarchy(); | 386 void updateInternalHierarchy(); |
387 void updatePaintingPhases(); | 387 void updatePaintingPhases(); |
388 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); | 388 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); |
389 bool updateClippingLayers(bool needsAncestorClip, | 389 bool updateClippingLayers(bool needsAncestorClip, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 const PaintLayer& referenceLayer, | 482 const PaintLayer& referenceLayer, |
483 const GraphicsLayerPaintInfo&, | 483 const GraphicsLayerPaintInfo&, |
484 const Vector<GraphicsLayerPaintInfo>& layers); | 484 const Vector<GraphicsLayerPaintInfo>& layers); |
485 | 485 |
486 // Conservatively check that a border-radius clip does not clip a child. | 486 // Conservatively check that a border-radius clip does not clip a child. |
487 // This is a fast approximate test. Depending on the shape of the child and | 487 // This is a fast approximate test. Depending on the shape of the child and |
488 // the size of the border radius, this method may return false when in fact | 488 // the size of the border radius, this method may return false when in fact |
489 // the child is not clipped. We accept the approximation because most border | 489 // the child is not clipped. We accept the approximation because most border |
490 // radii are small and the outcome is used to reduce the number of layers, | 490 // radii are small and the outcome is used to reduce the number of layers, |
491 // not influence correctness. | 491 // not influence correctness. |
492 bool ancestorRoundedCornersWontClip(const LayoutObject* child, | 492 bool ancestorRoundedCornersWontClip( |
493 const LayoutObject* clippingAncestor); | 493 const LayoutBoxModelObject& child, |
| 494 const LayoutBoxModelObject& clippingAncestor); |
494 | 495 |
495 // Return true in |owningLayerIsClipped| iff |m_owningLayer|'s compositing | 496 // Return true in |owningLayerIsClipped| iff |m_owningLayer|'s compositing |
496 // ancestor is not a descendant (inclusive) of the clipping container for | 497 // ancestor is not a descendant (inclusive) of the clipping container for |
497 // |m_owningLayer|. Return true in |owningLayerIsMasked| iff | 498 // |m_owningLayer|. Return true in |owningLayerIsMasked| iff |
498 // |owningLayerIsClipped| is true and |m_owningLayer|'s compositing ancestor | 499 // |owningLayerIsClipped| is true and |m_owningLayer|'s compositing ancestor |
499 // is not a descendant (inclusive) of a container that applies a mask for | 500 // is not a descendant (inclusive) of a container that applies a mask for |
500 // |m_owningLayer|. | 501 // |m_owningLayer|. |
501 void owningLayerClippedOrMaskedByLayerNotAboveCompositedAncestor( | 502 void owningLayerClippedOrMaskedByLayerNotAboveCompositedAncestor( |
502 const PaintLayer* scrollParent, | 503 const PaintLayer* scrollParent, |
503 bool& owningLayerIsClipped, | 504 bool& owningLayerIsClipped, |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 unsigned m_backgroundPaintsOntoGraphicsLayer : 1; | 702 unsigned m_backgroundPaintsOntoGraphicsLayer : 1; |
702 | 703 |
703 bool m_drawsBackgroundOntoContentLayer; | 704 bool m_drawsBackgroundOntoContentLayer; |
704 | 705 |
705 friend class CompositedLayerMappingTest; | 706 friend class CompositedLayerMappingTest; |
706 }; | 707 }; |
707 | 708 |
708 } // namespace blink | 709 } // namespace blink |
709 | 710 |
710 #endif // CompositedLayerMapping_h | 711 #endif // CompositedLayerMapping_h |
OLD | NEW |