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

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

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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 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) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 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 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after
2727 m_bitfields.isScrollAnchorObject()) { 2727 m_bitfields.isScrollAnchorObject()) {
2728 // Clear the bit first so that anchor.clear() doesn't recurse into 2728 // Clear the bit first so that anchor.clear() doesn't recurse into
2729 // findReferencingScrollAnchors. 2729 // findReferencingScrollAnchors.
2730 m_bitfields.setIsScrollAnchorObject(false); 2730 m_bitfields.setIsScrollAnchorObject(false);
2731 findReferencingScrollAnchors(this, Clear); 2731 findReferencingScrollAnchors(this, Clear);
2732 } 2732 }
2733 } 2733 }
2734 2734
2735 void LayoutObject::setNeedsPaintPropertyUpdate() { 2735 void LayoutObject::setNeedsPaintPropertyUpdate() {
2736 m_bitfields.setNeedsPaintPropertyUpdate(true); 2736 m_bitfields.setNeedsPaintPropertyUpdate(true);
2737 // |paintInvalidationParent()| is used to ensure we continue marking across
chrishtr 2016/12/01 02:36:34 I don't think this comment is necessary.
2738 // frame boundaries.
2739 if (LayoutObject* ancestor = paintInvalidationParent())
2740 ancestor->setDescendantNeedsPaintPropertyUpdate();
2741 }
2737 2742
2738 // Mark all ancestors as having a descendant needing paint property updates. 2743 void LayoutObject::setDescendantNeedsPaintPropertyUpdate() {
chrishtr 2016/12/01 02:36:35 *markAncestorChain* is how other bit-setting metho
2744 if (m_bitfields.descendantNeedsPaintPropertyUpdate())
2745 return;
2746 m_bitfields.setDescendantNeedsPaintPropertyUpdate(true);
2747
2739 // |paintInvalidationParent()| is used to ensure we continue marking across 2748 // |paintInvalidationParent()| is used to ensure we continue marking across
2740 // frame boundaries. 2749 // frame boundaries.
2741 LayoutObject* ancestor = paintInvalidationParent(); 2750 LayoutObject* ancestor = paintInvalidationParent();
2742 while (ancestor && !ancestor->descendantNeedsPaintPropertyUpdate()) { 2751 while (ancestor && !ancestor->descendantNeedsPaintPropertyUpdate()) {
2743 ancestor->m_bitfields.setDescendantNeedsPaintPropertyUpdate(true); 2752 ancestor->m_bitfields.setDescendantNeedsPaintPropertyUpdate(true);
2744 ancestor = ancestor->paintInvalidationParent(); 2753 ancestor = ancestor->paintInvalidationParent();
2745 } 2754 }
2746 } 2755 }
2747 2756
2748 void LayoutObject::setAncestorsNeedPaintPropertyUpdateForMainThreadScrolling() { 2757 void LayoutObject::setAncestorsNeedPaintPropertyUpdateForMainThreadScrolling() {
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
3502 const blink::LayoutObject* root = object1; 3511 const blink::LayoutObject* root = object1;
3503 while (root->parent()) 3512 while (root->parent())
3504 root = root->parent(); 3513 root = root->parent();
3505 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3514 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3506 } else { 3515 } else {
3507 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3516 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3508 } 3517 }
3509 } 3518 }
3510 3519
3511 #endif 3520 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698