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

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

Issue 2539693002: Early-out from the prepaint tree walk (Closed)
Patch Set: Do not force subtree updates for all paint invalidation reasons, add todo to track paint offset cha… Created 4 years 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
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. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 } 1696 }
1697 void setPreviousBackgroundObscured(bool b) { 1697 void setPreviousBackgroundObscured(bool b) {
1698 m_layoutObject.setPreviousBackgroundObscured(b); 1698 m_layoutObject.setPreviousBackgroundObscured(b);
1699 } 1699 }
1700 void clearPreviousVisualRects() { 1700 void clearPreviousVisualRects() {
1701 m_layoutObject.clearPreviousVisualRects(); 1701 m_layoutObject.clearPreviousVisualRects();
1702 } 1702 }
1703 void setNeedsPaintPropertyUpdate() { 1703 void setNeedsPaintPropertyUpdate() {
1704 m_layoutObject.setNeedsPaintPropertyUpdate(); 1704 m_layoutObject.setNeedsPaintPropertyUpdate();
1705 } 1705 }
1706 void setNeedsPaintPropertyUpdateWithoutMarkingAncestors() {
1707 m_layoutObject.setNeedsPaintPropertyUpdateWithoutMarkingAncestors();
1708 }
1706 void clearNeedsPaintPropertyUpdate() { 1709 void clearNeedsPaintPropertyUpdate() {
1707 m_layoutObject.clearNeedsPaintPropertyUpdate(); 1710 m_layoutObject.clearNeedsPaintPropertyUpdate();
1708 } 1711 }
1709 void clearDescendantNeedsPaintPropertyUpdate() { 1712 void clearDescendantNeedsPaintPropertyUpdate() {
1710 m_layoutObject.clearDescendantNeedsPaintPropertyUpdate(); 1713 m_layoutObject.clearDescendantNeedsPaintPropertyUpdate();
1711 } 1714 }
1712 1715
1713 protected: 1716 protected:
1714 friend class PaintPropertyTreeBuilder; 1717 friend class PaintPropertyTreeBuilder;
1715 // The following two functions can be called from PaintPropertyTreeBuilder 1718 // The following two functions can be called from PaintPropertyTreeBuilder
(...skipping 19 matching lines...) Expand all
1735 // Paint properties (see: |ObjectPaintProperties|) are built from an object's 1738 // Paint properties (see: |ObjectPaintProperties|) are built from an object's
1736 // state (location, transform, etc) as well as properties from ancestors. 1739 // state (location, transform, etc) as well as properties from ancestors.
1737 // When these inputs change, setNeedsPaintPropertyUpdate will cause a property 1740 // When these inputs change, setNeedsPaintPropertyUpdate will cause a property
1738 // tree update during the next document lifecycle update. 1741 // tree update during the next document lifecycle update.
1739 // 1742 //
1740 // In addition to tracking if an object needs its own paint properties 1743 // In addition to tracking if an object needs its own paint properties
1741 // updated, |descendantNeedsPaintPropertyUpdate| is used to track if any 1744 // updated, |descendantNeedsPaintPropertyUpdate| is used to track if any
1742 // descendant needs an update too. This bit is up the tree, crossing frames, 1745 // descendant needs an update too. This bit is up the tree, crossing frames,
1743 // when calling |setNeedsPaintPropertyUpdate|. 1746 // when calling |setNeedsPaintPropertyUpdate|.
1744 void setNeedsPaintPropertyUpdate(); 1747 void setNeedsPaintPropertyUpdate();
1748 // Same as |setNeedsPaintPropertyUpdate| but does not notify ancestors as
1749 // having a descendant needing a paint property update.
1750 void setNeedsPaintPropertyUpdateWithoutMarkingAncestors() {
1751 DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint);
1752 m_bitfields.setNeedsPaintPropertyUpdate(true);
1753 }
1745 bool needsPaintPropertyUpdate() const { 1754 bool needsPaintPropertyUpdate() const {
1746 return m_bitfields.needsPaintPropertyUpdate(); 1755 return m_bitfields.needsPaintPropertyUpdate();
1747 } 1756 }
1748 void clearNeedsPaintPropertyUpdate() { 1757 void clearNeedsPaintPropertyUpdate() {
1749 DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint); 1758 DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint);
1750 m_bitfields.setNeedsPaintPropertyUpdate(false); 1759 m_bitfields.setNeedsPaintPropertyUpdate(false);
1751 } 1760 }
1761 // Sets |descendantNeedsPaintPropertyUpdate| on this object and all ancestors.
1762 void setDescendantNeedsPaintPropertyUpdate();
1752 bool descendantNeedsPaintPropertyUpdate() const { 1763 bool descendantNeedsPaintPropertyUpdate() const {
1753 return m_bitfields.descendantNeedsPaintPropertyUpdate(); 1764 return m_bitfields.descendantNeedsPaintPropertyUpdate();
1754 } 1765 }
1755 void clearDescendantNeedsPaintPropertyUpdate() { 1766 void clearDescendantNeedsPaintPropertyUpdate() {
1756 DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint); 1767 DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint);
1757 m_bitfields.setDescendantNeedsPaintPropertyUpdate(false); 1768 m_bitfields.setDescendantNeedsPaintPropertyUpdate(false);
1758 } 1769 }
1759 // Main thread scrolling reasons require fully updating paint propeties of all 1770 // Main thread scrolling reasons require fully updating paint propeties of all
1760 // ancestors (see: ScrollPaintPropertyNode.h). 1771 // ancestors (see: ScrollPaintPropertyNode.h).
1761 void setAncestorsNeedPaintPropertyUpdateForMainThreadScrolling(); 1772 void setAncestorsNeedPaintPropertyUpdateForMainThreadScrolling();
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
2657 CORE_EXPORT void showLineTree(const blink::LayoutObject*); 2668 CORE_EXPORT void showLineTree(const blink::LayoutObject*);
2658 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); 2669 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1);
2659 // We don't make object2 an optional parameter so that showLayoutTree 2670 // We don't make object2 an optional parameter so that showLayoutTree
2660 // can be called from gdb easily. 2671 // can be called from gdb easily.
2661 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, 2672 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1,
2662 const blink::LayoutObject* object2); 2673 const blink::LayoutObject* object2);
2663 2674
2664 #endif 2675 #endif
2665 2676
2666 #endif // LayoutObject_h 2677 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698