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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1584493002: Skip PaintPhaseDescendantOutlinesOnly if no descendent outlines in the layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 , m_hasFilterInfo(false) 120 , m_hasFilterInfo(false)
121 , m_needsAncestorDependentCompositingInputsUpdate(true) 121 , m_needsAncestorDependentCompositingInputsUpdate(true)
122 , m_needsDescendantDependentCompositingInputsUpdate(true) 122 , m_needsDescendantDependentCompositingInputsUpdate(true)
123 , m_childNeedsCompositingInputsUpdate(true) 123 , m_childNeedsCompositingInputsUpdate(true)
124 , m_hasCompositingDescendant(false) 124 , m_hasCompositingDescendant(false)
125 , m_hasNonCompositedChild(false) 125 , m_hasNonCompositedChild(false)
126 , m_shouldIsolateCompositedDescendants(false) 126 , m_shouldIsolateCompositedDescendants(false)
127 , m_lostGroupedMapping(false) 127 , m_lostGroupedMapping(false)
128 , m_needsRepaint(false) 128 , m_needsRepaint(false)
129 , m_previousPaintResult(PaintLayerPainter::FullyPainted) 129 , m_previousPaintResult(PaintLayerPainter::FullyPainted)
130 , m_needsPaintPhaseChildOutlines(false)
130 , m_layoutObject(layoutObject) 131 , m_layoutObject(layoutObject)
131 , m_parent(0) 132 , m_parent(0)
132 , m_previous(0) 133 , m_previous(0)
133 , m_next(0) 134 , m_next(0)
134 , m_first(0) 135 , m_first(0)
135 , m_last(0) 136 , m_last(0)
136 , m_staticInlinePosition(0) 137 , m_staticInlinePosition(0)
137 , m_staticBlockPosition(0) 138 , m_staticBlockPosition(0)
138 , m_enclosingPaginationLayer(0) 139 , m_enclosingPaginationLayer(0)
139 , m_potentialCompositingReasonsFromStyle(CompositingReasonNone) 140 , m_potentialCompositingReasonsFromStyle(CompositingReasonNone)
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 return const_cast<PaintLayer*>(this); 939 return const_cast<PaintLayer*>(this);
939 940
940 for (PaintLayer* curr = compositingContainer(); curr; curr = curr->compositi ngContainer()) { 941 for (PaintLayer* curr = compositingContainer(); curr; curr = curr->compositi ngContainer()) {
941 if (curr->isPaintInvalidationContainer()) 942 if (curr->isPaintInvalidationContainer())
942 return curr; 943 return curr;
943 } 944 }
944 945
945 return nullptr; 946 return nullptr;
946 } 947 }
947 948
949 PaintLayer* PaintLayer::enclosingSelfPaintingLayer() const
950 {
951 for (PaintLayer* layer = const_cast<PaintLayer*>(this); layer; layer = layer ->parent()) {
chrishtr 2016/01/12 23:52:24 should be compositingContainer() instead of parent
Xianzhu 2016/01/13 00:11:03 No. We just want to find the self painting layer w
chrishtr 2016/01/13 05:01:17 I see, ok.
952 if (layer->isSelfPaintingLayer())
953 return layer;
954 }
955 return nullptr;
956 }
957
948 void PaintLayer::setNeedsCompositingInputsUpdate() 958 void PaintLayer::setNeedsCompositingInputsUpdate()
949 { 959 {
950 m_needsAncestorDependentCompositingInputsUpdate = true; 960 m_needsAncestorDependentCompositingInputsUpdate = true;
951 m_needsDescendantDependentCompositingInputsUpdate = true; 961 m_needsDescendantDependentCompositingInputsUpdate = true;
952 962
953 for (PaintLayer* current = this; current && !current->m_childNeedsCompositin gInputsUpdate; current = current->parent()) 963 for (PaintLayer* current = this; current && !current->m_childNeedsCompositin gInputsUpdate; current = current->parent())
954 current->m_childNeedsCompositingInputsUpdate = true; 964 current->m_childNeedsCompositingInputsUpdate = true;
955 965
956 compositor()->setNeedsCompositingUpdate(CompositingUpdateAfterCompositingInp utChange); 966 compositor()->setNeedsCompositingUpdate(CompositingUpdateAfterCompositingInp utChange);
957 } 967 }
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after
2830 2840
2831 void showLayerTree(const blink::LayoutObject* layoutObject) 2841 void showLayerTree(const blink::LayoutObject* layoutObject)
2832 { 2842 {
2833 if (!layoutObject) { 2843 if (!layoutObject) {
2834 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2844 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2835 return; 2845 return;
2836 } 2846 }
2837 showLayerTree(layoutObject->enclosingLayer()); 2847 showLayerTree(layoutObject->enclosingLayer());
2838 } 2848 }
2839 #endif 2849 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698