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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 1585823002: Improve performance when calling PaintLayer::setNeedsRepaint() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@RemoveVisualRect
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 1485
1486 // This function generates the invalidation for this object only. 1486 // This function generates the invalidation for this object only.
1487 // It doesn't recurse into other object, as this is handled 1487 // It doesn't recurse into other object, as this is handled
1488 // by invalidatePaintOfSubtreesIfNeeded. 1488 // by invalidatePaintOfSubtreesIfNeeded.
1489 virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationSta te&, const LayoutBoxModelObject& paintInvalidationContainer); 1489 virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationSta te&, const LayoutBoxModelObject& paintInvalidationContainer);
1490 1490
1491 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients 1491 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients
1492 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc., 1492 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc.,
1493 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and 1493 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and
1494 // parts which are invalidated separately (e.g. scrollbars). 1494 // parts which are invalidated separately (e.g. scrollbars).
1495 // The caller should ensure the enclosing layer has been setNeedsRepaint bef ore calling this function.
1495 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer, PaintInvalidationReason) const; 1496 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer, PaintInvalidationReason) const;
1496 1497
1498 // Sets enclosing layer needsRepaint, then calls invalidateDisplayItemClient s().
1499 // Should use this version when PaintInvalidationState is available.
1500 void invalidateDisplayItemClientsWithPaintInvalidationState(const LayoutBoxM odelObject& paintInvalidationContainer, const PaintInvalidationState&, PaintInva lidationReason) const;
1501
1497 void setIsBackgroundAttachmentFixedObject(bool); 1502 void setIsBackgroundAttachmentFixedObject(bool);
1498 1503
1499 void clearSelfNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setSelfNee dsOverflowRecalcAfterStyleChange(false); } 1504 void clearSelfNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setSelfNee dsOverflowRecalcAfterStyleChange(false); }
1500 void clearChildNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setChildN eedsOverflowRecalcAfterStyleChange(false); } 1505 void clearChildNeedsOverflowRecalcAfterStyleChange() { m_bitfields.setChildN eedsOverflowRecalcAfterStyleChange(false); }
1501 void setShouldInvalidateOverflowForPaint() { m_bitfields.setShouldInvalidate OverflowForPaint(true); } 1506 void setShouldInvalidateOverflowForPaint() { m_bitfields.setShouldInvalidate OverflowForPaint(true); }
1502 void setEverHadLayout() { m_bitfields.setEverHadLayout(true); } 1507 void setEverHadLayout() { m_bitfields.setEverHadLayout(true); }
1503 1508
1504 // Remove this object and all descendants from the containing LayoutFlowThre ad. 1509 // Remove this object and all descendants from the containing LayoutFlowThre ad.
1505 void removeFromLayoutFlowThread(); 1510 void removeFromLayoutFlowThread();
1506 1511
(...skipping 27 matching lines...) Expand all
1534 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers ); 1539 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers );
1535 1540
1536 void setNeedsOverflowRecalcAfterStyleChange(); 1541 void setNeedsOverflowRecalcAfterStyleChange();
1537 1542
1538 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make LayoutBox 1543 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make LayoutBox
1539 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. 1544 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700.
1540 inline void markContainingBlocksForOverflowRecalc(); 1545 inline void markContainingBlocksForOverflowRecalc();
1541 1546
1542 inline void markContainerChainForPaintInvalidation(); 1547 inline void markContainerChainForPaintInvalidation();
1543 1548
1544 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject&, PaintIn validationReason); 1549 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject& paintInv alidationContainer, const PaintInvalidationState&, PaintInvalidationReason);
1545 1550
1546 inline void invalidateContainerPreferredLogicalWidths(); 1551 inline void invalidateContainerPreferredLogicalWidths();
1547 1552
1553 void invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(const L ayoutBoxModelObject& paintInvalidationContainer);
1554
1555 // The caller should ensure the enclosing layer has been setNeedsRepaint bef ore calling this function.
1548 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje ct& paintInvalidationContainer, PaintInvalidationReason); 1556 void invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBoxModelObje ct& paintInvalidationContainer, PaintInvalidationReason);
1549 1557
1550 LayoutRect previousSelectionRectForPaintInvalidation() const; 1558 LayoutRect previousSelectionRectForPaintInvalidation() const;
1551 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); 1559 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&);
1552 1560
1553 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* paint InvalidationContainer = nullptr, bool* paintInvalidationContainerSkipped = nullp tr) const; 1561 LayoutObject* containerForAbsolutePosition(const LayoutBoxModelObject* paint InvalidationContainer = nullptr, bool* paintInvalidationContainerSkipped = nullp tr) const;
1554 1562
1555 const LayoutBoxModelObject* enclosingCompositedContainer() const; 1563 const LayoutBoxModelObject* enclosingCompositedContainer() const;
1556 1564
1557 LayoutFlowThread* locateFlowThreadContainingBlock() const; 1565 LayoutFlowThread* locateFlowThreadContainingBlock() const;
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 void showTree(const blink::LayoutObject*); 2103 void showTree(const blink::LayoutObject*);
2096 void showLineTree(const blink::LayoutObject*); 2104 void showLineTree(const blink::LayoutObject*);
2097 void showLayoutTree(const blink::LayoutObject* object1); 2105 void showLayoutTree(const blink::LayoutObject* object1);
2098 // We don't make object2 an optional parameter so that showLayoutTree 2106 // We don't make object2 an optional parameter so that showLayoutTree
2099 // can be called from gdb easily. 2107 // can be called from gdb easily.
2100 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2108 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2101 2109
2102 #endif 2110 #endif
2103 2111
2104 #endif // LayoutObject_h 2112 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698