Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: sky/engine/core/rendering/RenderInline.cpp

Issue 845873004: Delete a bunch of paint invalidation rect computing code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/rendering/RenderInline.h ('k') | sky/engine/core/rendering/RenderLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderInline.cpp
diff --git a/sky/engine/core/rendering/RenderInline.cpp b/sky/engine/core/rendering/RenderInline.cpp
index 3c88ea68d48556bb10f5eea87a25e429aef4bce4..6518c6f784ac2c9d5e268fcf75cb087ff853ee2c 100644
--- a/sky/engine/core/rendering/RenderInline.cpp
+++ b/sky/engine/core/rendering/RenderInline.cpp
@@ -607,61 +607,6 @@ LayoutRect RenderInline::linesVisualOverflowBoundingBox() const
return rect;
}
-LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
-{
- if (!firstLineBoxIncludingCulling())
- return LayoutRect();
-
- LayoutRect paintInvalidationRect(linesVisualOverflowBoundingBox());
- bool hitPaintInvalidationContainer = false;
-
- // We need to add in the in-flow position offsets of any inlines (including us) up to our
- // containing block.
- RenderBlock* cb = containingBlock();
- for (const RenderObject* inlineFlow = this; inlineFlow && inlineFlow->isRenderInline() && inlineFlow != cb;
- inlineFlow = inlineFlow->parent()) {
- if (inlineFlow == paintInvalidationContainer) {
- hitPaintInvalidationContainer = true;
- break;
- }
- if (inlineFlow->style()->hasInFlowPosition() && inlineFlow->hasLayer())
- paintInvalidationRect.move(toRenderInline(inlineFlow)->layer()->offsetForInFlowPosition());
- }
-
- LayoutUnit outlineSize = style()->outlineSize();
- paintInvalidationRect.inflate(outlineSize);
-
- if (hitPaintInvalidationContainer || !cb)
- return paintInvalidationRect;
-
- if (cb->hasOverflowClip())
- cb->applyCachedClipAndScrollOffsetForPaintInvalidation(paintInvalidationRect);
-
- // FIXME: Passing paintInvalidationState directly to mapRectToPaintInvalidationBacking causes incorrect invalidations.
- // Should avoid slowRectMapping by properly adjusting paintInvalidationState. crbug.com/402994.
- ForceHorriblySlowRectMapping slowRectMapping(paintInvalidationState);
- cb->mapRectToPaintInvalidationBacking(paintInvalidationContainer, paintInvalidationRect, paintInvalidationState);
-
- if (outlineSize) {
- for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
- if (!curr->isText())
- paintInvalidationRect.unite(curr->rectWithOutlineForPaintInvalidation(paintInvalidationContainer, outlineSize));
- }
- }
-
- return paintInvalidationRect;
-}
-
-LayoutRect RenderInline::rectWithOutlineForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalidationState* paintInvalidationState) const
-{
- LayoutRect r(RenderBoxModelObject::rectWithOutlineForPaintInvalidation(paintInvalidationContainer, outlineWidth, paintInvalidationState));
- for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
- if (!curr->isText())
- r.unite(curr->rectWithOutlineForPaintInvalidation(paintInvalidationContainer, outlineWidth, paintInvalidationState));
- }
- return r;
-}
-
void RenderInline::mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const
{
if (paintInvalidationState && paintInvalidationState->canMapToContainer(paintInvalidationContainer)) {
« no previous file with comments | « sky/engine/core/rendering/RenderInline.h ('k') | sky/engine/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698