Index: third_party/WebKit/Source/core/paint/PaintLayerClipper.h |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipper.h b/third_party/WebKit/Source/core/paint/PaintLayerClipper.h |
index c3ad800e810459a338fe16444bad878dd48d51ef..4081b8db95cc9743a84200d7b387fe690584e377 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipper.h |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipper.h |
@@ -48,6 +48,12 @@ |
#include "core/CoreExport.h" |
#include "core/layout/ClipRectsCache.h" |
#include "core/layout/ScrollEnums.h" |
+ |
+#include "platform/graphics/paint/ClipPaintPropertyNode.h" |
Xianzhu
2016/08/15 17:09:04
Nit: The XXXPaintPropertyNode.h headers are actual
chrishtr
2016/10/05 23:28:32
Done.
|
+#include "platform/graphics/paint/EffectPaintPropertyNode.h" |
+#include "platform/graphics/paint/GeometryMapper.h" |
+#include "platform/graphics/paint/TransformPaintPropertyNode.h" |
+ |
#include "wtf/Allocator.h" |
namespace blink { |
@@ -106,6 +112,20 @@ private: |
// PaintLayerClipper is responsible for computing and caching clip |
// rects. |
// |
+// These clip rects have two types: background and foreground. |
+// |
+// The "background rect" for a PaintLayer is almost the same as its visual |
+// rect in the space of some ancestor PaintLayer (specified by a parameter). |
+// The only difference is that unclipped rect at the start is LayoutRect::infiniteIntRect, |
+// rather than the local overflow bounds of the PaintLayer. Thus, for example |
+// if there are no clips then the background rect will be infinite. |
+// Also, whether overflow clip of the ancestor should be applied is a parameter. |
+// |
+// The "foreground rect" for a PaintLayer is its "background rect", intersected |
+// with any clip applied by this PaintLayer to its children. |
+ |
+// Motivation for this class: |
+// |
// The main reason for this cache is that we compute the clip rects during |
// a layout tree walk but need them during a paint tree walk (see example |
// below for some explanations). |
@@ -151,7 +171,7 @@ private: |
class CORE_EXPORT PaintLayerClipper { |
DISALLOW_NEW(); |
public: |
- explicit PaintLayerClipper(const PaintLayer& layer) : m_layer(layer) { } |
+ explicit PaintLayerClipper(const PaintLayer&); |
void clearClipRectsIncludingDescendants(); |
void clearClipRectsIncludingDescendants(ClipRectsCacheSlot); |
@@ -181,7 +201,10 @@ private: |
bool shouldRespectOverflowClip(const ClipRectsContext&) const; |
+ ClipRect clipRectWithGeometryMapper(const ClipRectsContext&, bool isForeground) const; |
+ |
const PaintLayer& m_layer; |
+ std::unique_ptr<GeometryMapper> m_geometryMapper; |
}; |
} // namespace blink |