Chromium Code Reviews| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 481 // contains this squashed layer's clipping ancestor. The clip rect is | 481 // contains this squashed layer's clipping ancestor. The clip rect is |
| 482 // returned in the coordinate space of the given squashed layer. If there is | 482 // returned in the coordinate space of the given squashed layer. If there is |
| 483 // no such containing layer, returns the infinite rect. | 483 // no such containing layer, returns the infinite rect. |
| 484 // FIXME: unify this code with the code that sets up m_ancestorClippingLayer. | 484 // FIXME: unify this code with the code that sets up m_ancestorClippingLayer. |
| 485 // They are doing very similar things. | 485 // They are doing very similar things. |
| 486 static IntRect LocalClipRectForSquashedLayer( | 486 static IntRect LocalClipRectForSquashedLayer( |
| 487 const PaintLayer& reference_layer, | 487 const PaintLayer& reference_layer, |
| 488 const GraphicsLayerPaintInfo&, | 488 const GraphicsLayerPaintInfo&, |
| 489 const Vector<GraphicsLayerPaintInfo>& layers); | 489 const Vector<GraphicsLayerPaintInfo>& layers); |
| 490 | 490 |
| 491 // Conservatively check that a border-radius clip does not clip a child. | 491 // Conservatively check that a sequence of border-radius clips do not clip |
| 492 // this layer. | |
| 492 // This is a fast approximate test. Depending on the shape of the child and | 493 // This is a fast approximate test. Depending on the shape of the child and |
| 493 // the size of the border radius, this method may return false when in fact | 494 // the size of the clips, this method may return false when in fact |
| 494 // the child is not clipped. We accept the approximation because most border | 495 // the child is not clipped. We accept the approximation because most border |
| 495 // radii are small and the outcome is used to reduce the number of layers, | 496 // radii are small and the outcome is used to reduce the number of layers, |
| 496 // not influence correctness. | 497 // not influence correctness. |
| 497 bool AncestorRoundedCornersWontClip( | 498 bool AncestorRoundedCornersWontClip(const PaintLayer*); |
|
chrishtr
2017/06/12 19:58:46
Name this arg compositing_ancestor and add documen
Stephen Chennney
2017/06/12 20:41:53
Done.
| |
| 498 const LayoutBoxModelObject& child, | |
| 499 const LayoutBoxModelObject& clipping_ancestor); | |
| 500 | 499 |
| 501 // Return true in |owningLayerIsClipped| iff |m_owningLayer|'s compositing | 500 // Return true in |owningLayerIsClipped| iff |m_owningLayer|'s compositing |
| 502 // ancestor is not a descendant (inclusive) of the clipping container for | 501 // ancestor is not a descendant (inclusive) of the clipping container for |
| 503 // |m_owningLayer|. Return true in |owningLayerIsMasked| iff | 502 // |m_owningLayer|. Return true in |owningLayerIsMasked| iff |
| 504 // |owningLayerIsClipped| is true and |m_owningLayer|'s compositing ancestor | 503 // |owningLayerIsClipped| is true and |m_owningLayer|'s compositing ancestor |
| 505 // is not a descendant (inclusive) of a container that applies a mask for | 504 // is not a descendant (inclusive) of a container that applies a mask for |
| 506 // |m_owningLayer|. | 505 // |m_owningLayer|. |
| 507 void OwningLayerClippedOrMaskedByLayerNotAboveCompositedAncestor( | 506 void OwningLayerClippedOrMaskedByLayerNotAboveCompositedAncestor( |
| 508 const PaintLayer* scroll_parent, | 507 const PaintLayer* scroll_parent, |
| 509 bool& owning_layer_is_clipped, | 508 bool& owning_layer_is_clipped, |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 707 unsigned background_paints_onto_graphics_layer_ : 1; | 706 unsigned background_paints_onto_graphics_layer_ : 1; |
| 708 | 707 |
| 709 bool draws_background_onto_content_layer_; | 708 bool draws_background_onto_content_layer_; |
| 710 | 709 |
| 711 friend class CompositedLayerMappingTest; | 710 friend class CompositedLayerMappingTest; |
| 712 }; | 711 }; |
| 713 | 712 |
| 714 } // namespace blink | 713 } // namespace blink |
| 715 | 714 |
| 716 #endif // CompositedLayerMapping_h | 715 #endif // CompositedLayerMapping_h |
| OLD | NEW |