| OLD | NEW |
| 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 #ifndef LayerClipRecorder_h | 5 #ifndef LayerClipRecorder_h |
| 6 #define LayerClipRecorder_h | 6 #define LayerClipRecorder_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/paint/PaintLayerPaintingInfo.h" | 9 #include "core/paint/PaintLayerPaintingInfo.h" |
| 10 #include "core/paint/PaintPhase.h" | 10 #include "core/paint/PaintPhase.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const LayoutBoxModelObject&, | 46 const LayoutBoxModelObject&, |
| 47 DisplayItem::Type, | 47 DisplayItem::Type, |
| 48 const ClipRect&, | 48 const ClipRect&, |
| 49 const PaintLayer* clip_root, | 49 const PaintLayer* clip_root, |
| 50 const LayoutPoint& fragment_offset, | 50 const LayoutPoint& fragment_offset, |
| 51 PaintLayerFlags, | 51 PaintLayerFlags, |
| 52 BorderRadiusClippingRule = kIncludeSelfForBorderRadius); | 52 BorderRadiusClippingRule = kIncludeSelfForBorderRadius); |
| 53 | 53 |
| 54 ~LayerClipRecorder(); | 54 ~LayerClipRecorder(); |
| 55 | 55 |
| 56 // Build a vector of the border radius clips that should be applied to |
| 57 // the given PaintLayer, walking up the paint layer tree to the clip_root. |
| 58 // The offset_within_layer is an offset to apply to the clip to position it |
| 59 // in the required clipping coordinates (for cases when the painting |
| 60 // coordinate system is offset from the layer coordinate system). |
| 61 // cross_composited_scrollers should be true when the search for clips should |
| 62 // continue even if the clipping layer is painting into a composited scrolling |
| 63 // layer, as when painting a mask for a child of the scroller. |
| 64 // The BorderRadiusClippingRule defines whether clips on the PaintLayer itself |
| 65 // are included. Output is appended to rounded_rect_clips. |
| 66 static void CollectRoundedRectClips( |
| 67 PaintLayer&, |
| 68 const PaintLayer* clip_root, |
| 69 const LayoutPoint& offset_within_layer, |
| 70 bool cross_composited_scrollers, |
| 71 BorderRadiusClippingRule, |
| 72 Vector<FloatRoundedRect>& rounded_rect_clips); |
| 73 |
| 56 private: | 74 private: |
| 57 void CollectRoundedRectClips(PaintLayer&, | |
| 58 const PaintLayer* clip_root, | |
| 59 GraphicsContext&, | |
| 60 const LayoutPoint& fragment_offset, | |
| 61 PaintLayerFlags, | |
| 62 BorderRadiusClippingRule, | |
| 63 Vector<FloatRoundedRect>& rounded_rect_clips); | |
| 64 | |
| 65 GraphicsContext& graphics_context_; | 75 GraphicsContext& graphics_context_; |
| 66 const LayoutBoxModelObject& layout_object_; | 76 const LayoutBoxModelObject& layout_object_; |
| 67 DisplayItem::Type clip_type_; | 77 DisplayItem::Type clip_type_; |
| 68 }; | 78 }; |
| 69 | 79 |
| 70 } // namespace blink | 80 } // namespace blink |
| 71 | 81 |
| 72 #endif // LayerClipRecorder_h | 82 #endif // LayerClipRecorder_h |
| OLD | NEW |