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 ClipRecorder_h | 5 #ifndef ClipRecorder_h |
6 #define ClipRecorder_h | 6 #define ClipRecorder_h |
7 | 7 |
8 #include "core/paint/ViewDisplayList.h" | 8 #include "core/paint/ViewDisplayList.h" |
9 #include "core/rendering/LayerPaintingInfo.h" | 9 #include "core/rendering/LayerPaintingInfo.h" |
10 #include "core/rendering/PaintPhase.h" | 10 #include "core/rendering/PaintPhase.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelf
ForBorderRadius }; | 46 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelf
ForBorderRadius }; |
47 | 47 |
48 // Set rounded clip rectangles defined by border radii all the way from the
LayerPaintingInfo | 48 // Set rounded clip rectangles defined by border radii all the way from the
LayerPaintingInfo |
49 // "root" layer down to the specified layer (or the parent of said layer, in
case | 49 // "root" layer down to the specified layer (or the parent of said layer, in
case |
50 // BorderRadiusClippingRule says to skip self). fragmentOffset is used for m
ulticol, to specify | 50 // BorderRadiusClippingRule says to skip self). fragmentOffset is used for m
ulticol, to specify |
51 // the translation required to get from flow thread coordinates to visual co
ordinates for a | 51 // the translation required to get from flow thread coordinates to visual co
ordinates for a |
52 // certain column. | 52 // certain column. |
53 // FIXME: The BorderRadiusClippingRule parameter is really useless now. If w
e want to skip self, | 53 // FIXME: The BorderRadiusClippingRule parameter is really useless now. If w
e want to skip self, |
54 // why not just supply the parent layer as the first parameter instead? | 54 // why not just supply the parent layer as the first parameter instead? |
| 55 // FIXME: The ClipRect passed is in visual coordinates (not flow thread coor
dinates), but at the |
| 56 // same time we pass a fragmentOffset, so that we can translate from flow th
read coordinates to |
| 57 // visual coordinates. This may look rather confusing/redundant, but it is n
eeded for rounded |
| 58 // border clipping. Would be nice to clean up this. |
55 explicit ClipRecorder(const RenderLayerModelObject*, GraphicsContext*, Displ
ayItem::Type, const ClipRect&, const LayerPaintingInfo* localPaintingInfo, const
LayoutPoint& fragmentOffset, PaintLayerFlags, BorderRadiusClippingRule = Includ
eSelfForBorderRadius); | 59 explicit ClipRecorder(const RenderLayerModelObject*, GraphicsContext*, Displ
ayItem::Type, const ClipRect&, const LayerPaintingInfo* localPaintingInfo, const
LayoutPoint& fragmentOffset, PaintLayerFlags, BorderRadiusClippingRule = Includ
eSelfForBorderRadius); |
56 | 60 |
57 ~ClipRecorder(); | 61 ~ClipRecorder(); |
58 | 62 |
59 private: | 63 private: |
60 | 64 |
61 void collectRoundedRectClips(RenderLayer&, const LayerPaintingInfo& localPai
ntingInfo, GraphicsContext*, const LayoutPoint& fragmentOffset, PaintLayerFlags, | 65 void collectRoundedRectClips(RenderLayer&, const LayerPaintingInfo& localPai
ntingInfo, GraphicsContext*, const LayoutPoint& fragmentOffset, PaintLayerFlags, |
62 BorderRadiusClippingRule, Vector<RoundedRect>& roundedRectClips); | 66 BorderRadiusClippingRule, Vector<RoundedRect>& roundedRectClips); |
63 | 67 |
64 GraphicsContext* m_graphicsContext; | 68 GraphicsContext* m_graphicsContext; |
65 const RenderLayerModelObject* m_renderer; | 69 const RenderLayerModelObject* m_renderer; |
66 }; | 70 }; |
67 | 71 |
68 } // namespace blink | 72 } // namespace blink |
69 | 73 |
70 #endif // ViewDisplayList_h | 74 #endif // ViewDisplayList_h |
OLD | NEW |