Index: third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h |
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h |
index 424af9294452ace0bbedbd08bf2d9ea1499cabaa..a5d554110d66e12bd47a7fca3ae9a8c3072b3130 100644 |
--- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h |
+++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h |
@@ -5,6 +5,7 @@ |
#ifndef PrePaintTreeWalk_h |
#define PrePaintTreeWalk_h |
+#include "core/paint/ClipRect.h" |
#include "core/paint/PaintInvalidator.h" |
#include "core/paint/PaintPropertyTreeBuilder.h" |
@@ -21,15 +22,34 @@ struct PrePaintTreeWalkContext; |
class PrePaintTreeWalk { |
public: |
PrePaintTreeWalk(GeometryMapper& geometryMapper) |
- : m_paintInvalidator(geometryMapper) {} |
+ : m_paintInvalidator(geometryMapper), m_geometryMapper(geometryMapper) {} |
void walk(FrameView& rootFrame); |
private: |
void walk(FrameView&, const PrePaintTreeWalkContext&); |
void walk(const LayoutObject&, const PrePaintTreeWalkContext&); |
+ // Invalidates paint-layer painting optimizations, such as |
+ // subsequence caching and empty paint phase optimizations, |
+ // if clips from the context have changed. |
+ void invalidatePaintLayerOptimizationsIfNeeded( |
+ const LayoutObject&, |
+ const PaintLayer& ancestorTransformedOrRootPaintLayer, |
+ PaintPropertyTreeBuilderContext&); |
+ |
+ // Returns the clip applied to children for the given |
+ // contaiing block context + effect, in the space of ancestorState adjusted |
+ // by ancestorPaintOffset. Sets hasClip to true if a clip was applied. |
+ ClipRect clipRectForContext( |
+ const PaintPropertyTreeBuilderContext::ContainingBlockContext&, |
+ const EffectPaintPropertyNode*, |
+ const PropertyTreeState& ancestorState, |
+ const LayoutPoint& ancestorPaintOffset, |
+ bool& hasClip); |
+ |
PaintPropertyTreeBuilder m_propertyTreeBuilder; |
PaintInvalidator m_paintInvalidator; |
+ GeometryMapper& m_geometryMapper; |
}; |
} // namespace blink |