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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 322163003: Rename AncestorDependentProperties to CompositingInputs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moar renaming Created 6 years, 6 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 | Annotate | Revision Log
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 , m_hasVisibleContent(false) 115 , m_hasVisibleContent(false)
116 , m_visibleDescendantStatusDirty(false) 116 , m_visibleDescendantStatusDirty(false)
117 , m_hasVisibleDescendant(false) 117 , m_hasVisibleDescendant(false)
118 , m_hasVisibleNonLayerContent(false) 118 , m_hasVisibleNonLayerContent(false)
119 , m_isPaginated(false) 119 , m_isPaginated(false)
120 , m_3DTransformedDescendantStatusDirty(true) 120 , m_3DTransformedDescendantStatusDirty(true)
121 , m_has3DTransformedDescendant(false) 121 , m_has3DTransformedDescendant(false)
122 , m_containsDirtyOverlayScrollbars(false) 122 , m_containsDirtyOverlayScrollbars(false)
123 , m_canSkipRepaintRectsUpdateOnScroll(renderer->isTableCell()) 123 , m_canSkipRepaintRectsUpdateOnScroll(renderer->isTableCell())
124 , m_hasFilterInfo(false) 124 , m_hasFilterInfo(false)
125 , m_needsToUpdateAncestorDependentProperties(true) 125 , m_needsCompositingInputsUpdate(true)
126 , m_childNeedsToUpdateAncestorDependantProperties(true) 126 , m_childNeedsCompositingInputsUpdate(true)
127 , m_hasCompositingDescendant(false) 127 , m_hasCompositingDescendant(false)
128 , m_hasNonCompositedChild(false) 128 , m_hasNonCompositedChild(false)
129 , m_shouldIsolateCompositedDescendants(false) 129 , m_shouldIsolateCompositedDescendants(false)
130 , m_lostGroupedMapping(false) 130 , m_lostGroupedMapping(false)
131 , m_viewportConstrainedNotCompositedReason(NoNotCompositedReason) 131 , m_viewportConstrainedNotCompositedReason(NoNotCompositedReason)
132 , m_renderer(renderer) 132 , m_renderer(renderer)
133 , m_parent(0) 133 , m_parent(0)
134 , m_previous(0) 134 , m_previous(0)
135 , m_next(0) 135 , m_next(0)
136 , m_first(0) 136 , m_first(0)
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 void RenderLayer::setHasVisibleContent() 738 void RenderLayer::setHasVisibleContent()
739 { 739 {
740 if (m_hasVisibleContent && !m_visibleContentStatusDirty) { 740 if (m_hasVisibleContent && !m_visibleContentStatusDirty) {
741 ASSERT(!parent() || parent()->hasVisibleDescendant()); 741 ASSERT(!parent() || parent()->hasVisibleDescendant());
742 return; 742 return;
743 } 743 }
744 744
745 m_hasVisibleContent = true; 745 m_hasVisibleContent = true;
746 m_visibleContentStatusDirty = false; 746 m_visibleContentStatusDirty = false;
747 747
748 setNeedsToUpdateAncestorDependentProperties(); 748 setNeedsCompositingInputsUpdate();
749 repainter().computeRepaintRects(); 749 repainter().computeRepaintRects();
750 750
751 if (parent()) 751 if (parent())
752 parent()->setAncestorChainHasVisibleDescendant(); 752 parent()->setAncestorChainHasVisibleDescendant();
753 } 753 }
754 754
755 void RenderLayer::dirtyVisibleContentStatus() 755 void RenderLayer::dirtyVisibleContentStatus()
756 { 756 {
757 m_visibleContentStatusDirty = true; 757 m_visibleContentStatusDirty = true;
758 if (parent()) 758 if (parent())
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 if (r) 869 if (r)
870 r = r->nextSibling(); 870 r = r->nextSibling();
871 } 871 }
872 } 872 }
873 } 873 }
874 m_visibleContentStatusDirty = false; 874 m_visibleContentStatusDirty = false;
875 875
876 // FIXME: We can remove this code once we remove the recursive tree 876 // FIXME: We can remove this code once we remove the recursive tree
877 // walk inside updateGraphicsLayerGeometry. 877 // walk inside updateGraphicsLayerGeometry.
878 if (hasVisibleContent() != previouslyHasVisibleContent) 878 if (hasVisibleContent() != previouslyHasVisibleContent)
879 setNeedsToUpdateAncestorDependentProperties(); 879 setNeedsCompositingInputsUpdate();
880 } 880 }
881 } 881 }
882 882
883 void RenderLayer::dirty3DTransformedDescendantStatus() 883 void RenderLayer::dirty3DTransformedDescendantStatus()
884 { 884 {
885 RenderLayerStackingNode* stackingNode = m_stackingNode->ancestorStackingCont extNode(); 885 RenderLayerStackingNode* stackingNode = m_stackingNode->ancestorStackingCont extNode();
886 if (!stackingNode) 886 if (!stackingNode)
887 return; 887 return;
888 888
889 stackingNode->layer()->m_3DTransformedDescendantStatusDirty = true; 889 stackingNode->layer()->m_3DTransformedDescendantStatusDirty = true;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 { 1063 {
1064 RenderLayer* curr = parent(); 1064 RenderLayer* curr = parent();
1065 while (curr && !curr->isRootLayer() && !curr->transform()) 1065 while (curr && !curr->isRootLayer() && !curr->transform())
1066 curr = curr->parent(); 1066 curr = curr->parent();
1067 1067
1068 return curr; 1068 return curr;
1069 } 1069 }
1070 1070
1071 LayoutPoint RenderLayer::computeOffsetFromTransformedAncestor() const 1071 LayoutPoint RenderLayer::computeOffsetFromTransformedAncestor() const
1072 { 1072 {
1073 const AncestorDependentProperties& properties = ancestorDependentProperties( ); 1073 const CompositingInputs& properties = compositingInputs();
1074 1074
1075 TransformState transformState(TransformState::ApplyTransformDirection, Float Point()); 1075 TransformState transformState(TransformState::ApplyTransformDirection, Float Point());
1076 // FIXME: add a test that checks flipped writing mode and ApplyContainerFlip are correct. 1076 // FIXME: add a test that checks flipped writing mode and ApplyContainerFlip are correct.
1077 renderer()->mapLocalToContainer(properties.transformAncestor ? properties.tr ansformAncestor->renderer() : 0, transformState, ApplyContainerFlip); 1077 renderer()->mapLocalToContainer(properties.transformAncestor ? properties.tr ansformAncestor->renderer() : 0, transformState, ApplyContainerFlip);
1078 transformState.flatten(); 1078 transformState.flatten();
1079 return LayoutPoint(transformState.lastPlanarPoint()); 1079 return LayoutPoint(transformState.lastPlanarPoint());
1080 } 1080 }
1081 1081
1082 const RenderLayer* RenderLayer::compositingContainer() const 1082 const RenderLayer* RenderLayer::compositingContainer() const
1083 { 1083 {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 { 1166 {
1167 const RenderLayer* curr = (includeSelf == IncludeSelf) ? this : parent(); 1167 const RenderLayer* curr = (includeSelf == IncludeSelf) ? this : parent();
1168 for (; curr; curr = curr->parent()) { 1168 for (; curr; curr = curr->parent()) {
1169 if (curr->requiresFullLayerImageForFilters()) 1169 if (curr->requiresFullLayerImageForFilters())
1170 return const_cast<RenderLayer*>(curr); 1170 return const_cast<RenderLayer*>(curr);
1171 } 1171 }
1172 1172
1173 return 0; 1173 return 0;
1174 } 1174 }
1175 1175
1176 void RenderLayer::setNeedsToUpdateAncestorDependentProperties() 1176 void RenderLayer::setNeedsCompositingInputsUpdate()
1177 { 1177 {
1178 m_needsToUpdateAncestorDependentProperties = true; 1178 m_needsCompositingInputsUpdate = true;
1179 1179
1180 for (RenderLayer* current = this; current && !current->m_childNeedsToUpdateA ncestorDependantProperties; current = current->parent()) 1180 for (RenderLayer* current = this; current && !current->m_childNeedsCompositi ngInputsUpdate; current = current->parent())
1181 current->m_childNeedsToUpdateAncestorDependantProperties = true; 1181 current->m_childNeedsCompositingInputsUpdate = true;
1182 } 1182 }
1183 1183
1184 void RenderLayer::updateAncestorDependentProperties(const AncestorDependentPrope rties& ancestorDependentProperties) 1184 void RenderLayer::updateCompositingInputs(const CompositingInputs& compositingIn puts)
1185 { 1185 {
1186 m_ancestorDependentProperties = ancestorDependentProperties; 1186 m_compositingInputs = compositingInputs;
1187 m_needsToUpdateAncestorDependentProperties = false; 1187 m_needsCompositingInputsUpdate = false;
1188 } 1188 }
1189 1189
1190 void RenderLayer::clearChildNeedsToUpdateAncestorDependantProperties() 1190 void RenderLayer::clearChildNeedsCompositingInputsUpdate()
1191 { 1191 {
1192 ASSERT(!m_needsToUpdateAncestorDependentProperties); 1192 ASSERT(!m_needsCompositingInputsUpdate);
1193 m_childNeedsToUpdateAncestorDependantProperties = false; 1193 m_childNeedsCompositingInputsUpdate = false;
1194 } 1194 }
1195 1195
1196 void RenderLayer::setCompositingReasons(CompositingReasons reasons, CompositingR easons mask) 1196 void RenderLayer::setCompositingReasons(CompositingReasons reasons, CompositingR easons mask)
1197 { 1197 {
1198 ASSERT(reasons == (reasons & mask)); 1198 ASSERT(reasons == (reasons & mask));
1199 if ((compositingReasons() & mask) == (reasons & mask)) 1199 if ((compositingReasons() & mask) == (reasons & mask))
1200 return; 1200 return;
1201 m_compositingReasons = (reasons & mask) | (compositingReasons() & ~mask); 1201 m_compositingReasons = (reasons & mask) | (compositingReasons() & ~mask);
1202 m_clipper.setCompositingClipRectsDirty(); 1202 m_clipper.setCompositingClipRectsDirty();
1203 } 1203 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 1381
1382 if (beforeChild) { 1382 if (beforeChild) {
1383 beforeChild->setPreviousSibling(child); 1383 beforeChild->setPreviousSibling(child);
1384 child->setNextSibling(beforeChild); 1384 child->setNextSibling(beforeChild);
1385 ASSERT(beforeChild != child); 1385 ASSERT(beforeChild != child);
1386 } else 1386 } else
1387 setLastChild(child); 1387 setLastChild(child);
1388 1388
1389 child->m_parent = this; 1389 child->m_parent = this;
1390 1390
1391 setNeedsToUpdateAncestorDependentProperties(); 1391 setNeedsCompositingInputsUpdate();
1392 1392
1393 if (child->stackingNode()->isNormalFlowOnly()) 1393 if (child->stackingNode()->isNormalFlowOnly())
1394 m_stackingNode->dirtyNormalFlowList(); 1394 m_stackingNode->dirtyNormalFlowList();
1395 1395
1396 if (!child->stackingNode()->isNormalFlowOnly() || child->firstChild()) { 1396 if (!child->stackingNode()->isNormalFlowOnly() || child->firstChild()) {
1397 // Dirty the z-order list in which we are contained. The ancestorStackin gContextNode() can be null in the 1397 // Dirty the z-order list in which we are contained. The ancestorStackin gContextNode() can be null in the
1398 // case where we're building up generated content layers. This is ok, si nce the lists will start 1398 // case where we're building up generated content layers. This is ok, si nce the lists will start
1399 // off dirty in that case anyway. 1399 // off dirty in that case anyway.
1400 child->stackingNode()->dirtyStackingContextZOrderLists(); 1400 child->stackingNode()->dirtyStackingContextZOrderLists();
1401 } 1401 }
(...skipping 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after
3721 updateTransform(); 3721 updateTransform();
3722 3722
3723 { 3723 {
3724 // https://code.google.com/p/chromium/issues/detail?id=343759 3724 // https://code.google.com/p/chromium/issues/detail?id=343759
3725 DisableCompositingQueryAsserts disabler; 3725 DisableCompositingQueryAsserts disabler;
3726 updateFilters(oldStyle, renderer()->style()); 3726 updateFilters(oldStyle, renderer()->style());
3727 } 3727 }
3728 3728
3729 compositor()->updateStyleDeterminedCompositingReasons(this); 3729 compositor()->updateStyleDeterminedCompositingReasons(this);
3730 3730
3731 setNeedsToUpdateAncestorDependentProperties(); 3731 setNeedsCompositingInputsUpdate();
3732 3732
3733 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues 3733 // FIXME: Remove incremental compositing updates after fixing the chicken/eg g issues
3734 // https://code.google.com/p/chromium/issues/detail?id=343756 3734 // https://code.google.com/p/chromium/issues/detail?id=343756
3735 DisableCompositingQueryAsserts disabler; 3735 DisableCompositingQueryAsserts disabler;
3736 3736
3737 compositor()->updateLayerCompositingState(this, RenderLayerCompositor::UseCh ickenEggHacks); 3737 compositor()->updateLayerCompositingState(this, RenderLayerCompositor::UseCh ickenEggHacks);
3738 } 3738 }
3739 3739
3740 bool RenderLayer::scrollsOverflow() const 3740 bool RenderLayer::scrollsOverflow() const
3741 { 3741 {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3889 } 3889 }
3890 } 3890 }
3891 3891
3892 void showLayerTree(const WebCore::RenderObject* renderer) 3892 void showLayerTree(const WebCore::RenderObject* renderer)
3893 { 3893 {
3894 if (!renderer) 3894 if (!renderer)
3895 return; 3895 return;
3896 showLayerTree(renderer->enclosingLayer()); 3896 showLayerTree(renderer->enclosingLayer());
3897 } 3897 }
3898 #endif 3898 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698