diff options
author | wangxianzhu <wangxianzhu@chromium.org> | 2016-03-25 18:09:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-26 01:11:03 +0000 |
commit | 934f67a68da2054e526e13648c5452e2cf79c211 (patch) | |
tree | 277c6dd46f8140a7ef848eed1acf0c7e8432932a /third_party/WebKit/Source/core/paint/PaintLayer.h | |
parent | 2e08ddfc910194c1fed498a86f55518707322dd3 (diff) | |
download | chromium_src-934f67a68da2054e526e13648c5452e2cf79c211.zip chromium_src-934f67a68da2054e526e13648c5452e2cf79c211.tar.gz chromium_src-934f67a68da2054e526e13648c5452e2cf79c211.tar.bz2 |
Move all fast-path paint invalidation mapping into PaintInvalidationState
- Remove the optional const PaintInvalidationState* parameter from paint
invalidation mapping methods and move fast-path mapping code into
PaintInvalidationState.
- PaintLayer::computePaintInvalidationRect() is now
PaintInvalidationState::computePaintInvalidationRectInBacking();
PaintLayer::positionFromPaintInvalidationBacking() is now
PaintInvalidationState::positionFromPaintInvalidationBacking();
PaintLayer::mapRectToPaintInvalidationBacking() is now
PaintInvalidationState::mapLocalRectToPaintInvalidationBacking().
- Change LayoutObject::clippedOverflowRectForPaintInvalidationBacking() to:
* Non-SVG objects and LayoutSVGRoot:
LayoutObject::localOverflowRectForPaintInvalidation() which doesn't
map the rect to paint invalidation backing;
* SVG objects except LayoutSVGRoot:
Using existing paintInvalidationRectInLocalSVGCoordinates()
PaintInvalidationState::computePaintInvalidationRectInBacking(),
calls the above functions to get the local paint invalidation rect,
and map to paintInvalidationContainer using fast path if possible,
or slow path by calling LayoutObject::mapToVisibleRectToAncestor().
- Let selection paint invalidation go through fast-path if possible.
BUG=591199
Review URL: https://codereview.chromium.org/1813383002
Cr-Commit-Position: refs/heads/master@{#383430}
Diffstat (limited to 'third_party/WebKit/Source/core/paint/PaintLayer.h')
-rw-r--r-- | third_party/WebKit/Source/core/paint/PaintLayer.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.h b/third_party/WebKit/Source/core/paint/PaintLayer.h index 2cbff35..26d5c27 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayer.h +++ b/third_party/WebKit/Source/core/paint/PaintLayer.h @@ -438,20 +438,12 @@ public: bool hasCompositedClippingMask() const; bool needsCompositedScrolling() const { return m_scrollableArea && m_scrollableArea->needsCompositedScrolling(); } - // Computes the position of the given layout object in the space of |paintInvalidationContainer|. - // FIXME: invert the logic to have paint invalidation containers take care of painting objects into them, rather than the reverse. - // This will allow us to clean up this static method messiness. - static LayoutPoint positionFromPaintInvalidationBacking(const LayoutObject*, const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0); - - static void mapPointInPaintInvalidationContainerToBacking(const LayoutBoxModelObject* paintInvalidationContainer, FloatPoint&); - static void mapRectInPaintInvalidationContainerToBacking(const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect&); + static void mapPointInPaintInvalidationContainerToBacking(const LayoutBoxModelObject& paintInvalidationContainer, FloatPoint&); + static void mapRectInPaintInvalidationContainerToBacking(const LayoutBoxModelObject& paintInvalidationContainer, LayoutRect&); // Adjusts the given rect (in the coordinate space of the LayoutObject) to the coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. - static void mapRectToPaintInvalidationBacking(const LayoutObject*, const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState* = 0); - - // Computes the bounding paint invalidation rect for |layoutObject|, in the coordinate space of |paintInvalidationContainer|'s GraphicsLayer backing. - // TODO(jchaffraix): |paintInvalidationContainer| should be a reference. - static LayoutRect computePaintInvalidationRect(const LayoutObject&, const PaintLayer* paintInvalidationContainer, const PaintInvalidationState* = 0); + // Should use PaintInvalidationState::mapRectToPaintInvalidationBacking() instead if PaintInvalidationState is available. + static void mapRectToPaintInvalidationBacking(const LayoutObject&, const LayoutBoxModelObject& paintInvalidationContainer, LayoutRect&); bool paintsWithTransparency(GlobalPaintFlags globalPaintFlags) const { |