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

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

Issue 20103002: Make composited scrolling codepaths co-operate. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix needsCompositedScrolling state Created 7 years, 3 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) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 839
840 void setAncestorChainHasSelfPaintingLayerDescendant(); 840 void setAncestorChainHasSelfPaintingLayerDescendant();
841 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 841 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
842 842
843 void setAncestorChainHasOutOfFlowPositionedDescendant(); 843 void setAncestorChainHasOutOfFlowPositionedDescendant();
844 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); 844 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
845 845
846 bool acceleratedCompositingForOverflowScrollEnabled() const; 846 bool acceleratedCompositingForOverflowScrollEnabled() const;
847 // FIXME: This is a temporary flag and should be removed once accelerated 847 // FIXME: This is a temporary flag and should be removed once accelerated
848 // overflow scroll is ready (crbug.com/254111). 848 // overflow scroll is ready (crbug.com/254111).
849 bool useCompositorDrivenAcceleratedScrolling() const;
849 bool compositorDrivenAcceleratedScrollingEnabled() const; 850 bool compositorDrivenAcceleratedScrollingEnabled() const;
850 void updateCanBeStackingContainer(); 851 void updateCanBeStackingContainer();
851 void collectBeforePromotionZOrderList(RenderLayer* ancestorStackingContext, OwnPtr<Vector<RenderLayer*> >& posZOrderListBeforePromote, OwnPtr<Vector<RenderL ayer*> >& negZOrderListBeforePromote); 852 void collectBeforePromotionZOrderList(RenderLayer* ancestorStackingContext, OwnPtr<Vector<RenderLayer*> >& posZOrderListBeforePromote, OwnPtr<Vector<RenderL ayer*> >& negZOrderListBeforePromote);
852 void collectAfterPromotionZOrderList(RenderLayer* ancestorStackingContext, O wnPtr<Vector<RenderLayer*> >& posZOrderListAfterPromote, OwnPtr<Vector<RenderLay er*> >& negZOrderListAfterPromote); 853 void collectAfterPromotionZOrderList(RenderLayer* ancestorStackingContext, O wnPtr<Vector<RenderLayer*> >& posZOrderListAfterPromote, OwnPtr<Vector<RenderLay er*> >& negZOrderListAfterPromote);
853 854
854 void dirtyNormalFlowListCanBePromotedToStackingContainer(); 855 void dirtyNormalFlowListCanBePromotedToStackingContainer();
855 void dirtySiblingStackingContextCanBePromotedToStackingContainer(); 856 void dirtySiblingStackingContextCanBePromotedToStackingContainer();
856 857
857 void computeRepaintRects(const RenderLayerModelObject* repaintContainer, con st RenderGeometryMap* = 0); 858 void computeRepaintRects(const RenderLayerModelObject* repaintContainer, con st RenderGeometryMap* = 0);
858 void computeRepaintRectsIncludingDescendants(); 859 void computeRepaintRectsIncludingDescendants();
859 void clearRepaintRects(); 860 void clearRepaintRects();
860 861
861 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&, 862 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&,
862 BorderRadiusClippingRule = IncludeSelfForBorderRadius); 863 BorderRadiusClippingRule = IncludeSelfForBorderRadius);
863 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C lipRect&); 864 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C lipRect&);
864 865
865 bool shouldRepaintAfterLayout() const; 866 bool shouldRepaintAfterLayout() const;
866 867
867 void updateSelfPaintingLayer(); 868 void updateSelfPaintingLayer();
868 void updateIsNormalFlowOnly(); 869 void updateIsNormalFlowOnly();
869 void updateVisibilityAfterStyleChange(const RenderStyle* oldStyle); 870 void updateVisibilityAfterStyleChange(const RenderStyle* oldStyle);
870 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle); 871 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle);
871 872
872 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle); 873 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle);
873 void updateScrollbarsAfterLayout(); 874 void updateScrollbarsAfterLayout();
874 875
875 void updateOutOfFlowPositioned(const RenderStyle* oldStyle); 876 void updateOutOfFlowPositioned(const RenderStyle* oldStyle);
876 877
877 void setNeedsCompositedScrolling(bool); 878 void setNeedsCompositedScrolling(bool);
879 void setNeedsToBeStackingContainer(bool needsToBeStackingContainer)
880 {
881 m_needsToBeStackingContainer = needsToBeStackingContainer;
882 }
878 void didUpdateNeedsCompositedScrolling(); 883 void didUpdateNeedsCompositedScrolling();
879 884
880 // Returns true if the position changed. 885 // Returns true if the position changed.
881 bool updateLayerPosition(); 886 bool updateLayerPosition();
882 887
883 void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags = defaultFlags); 888 void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags = defaultFlags);
884 889
885 enum UpdateLayerPositionsAfterScrollFlag { 890 enum UpdateLayerPositionsAfterScrollFlag {
886 NoFlag = 0, 891 NoFlag = 0,
887 IsOverflowScroll = 1 << 0, 892 IsOverflowScroll = 1 << 0,
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 1148
1144 // This is true if we have an out-of-flow positioned descendant whose 1149 // This is true if we have an out-of-flow positioned descendant whose
1145 // containing block is our ancestor. If this is the case, the descendant 1150 // containing block is our ancestor. If this is the case, the descendant
1146 // may fall outside of our clip preventing things like opting into 1151 // may fall outside of our clip preventing things like opting into
1147 // composited scrolling (which causes clipping of all descendants). 1152 // composited scrolling (which causes clipping of all descendants).
1148 unsigned m_hasUnclippedDescendant : 1; 1153 unsigned m_hasUnclippedDescendant : 1;
1149 1154
1150 unsigned m_isUnclippedDescendant : 1; 1155 unsigned m_isUnclippedDescendant : 1;
1151 1156
1152 unsigned m_needsCompositedScrolling : 1; 1157 unsigned m_needsCompositedScrolling : 1;
1158 unsigned m_needsToBeStackingContainer : 1;
1153 1159
1154 // If this is true, then no non-descendant appears between any of our 1160 // If this is true, then no non-descendant appears between any of our
1155 // descendants in stacking order. This is one of the requirements of being 1161 // descendants in stacking order. This is one of the requirements of being
1156 // able to safely become a stacking context. 1162 // able to safely become a stacking context.
1157 unsigned m_canBePromotedToStackingContainer : 1; 1163 unsigned m_canBePromotedToStackingContainer : 1;
1158 unsigned m_canBePromotedToStackingContainerDirty : 1; 1164 unsigned m_canBePromotedToStackingContainerDirty : 1;
1159 1165
1160 const unsigned m_isRootLayer : 1; 1166 const unsigned m_isRootLayer : 1;
1161 1167
1162 unsigned m_usedTransparency : 1; // Tracks whether we need to close a transp arent layer, i.e., whether 1168 unsigned m_usedTransparency : 1; // Tracks whether we need to close a transp arent layer, i.e., whether
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 1332
1327 } // namespace WebCore 1333 } // namespace WebCore
1328 1334
1329 #ifndef NDEBUG 1335 #ifndef NDEBUG
1330 // Outside the WebCore namespace for ease of invocation from gdb. 1336 // Outside the WebCore namespace for ease of invocation from gdb.
1331 void showLayerTree(const WebCore::RenderLayer*); 1337 void showLayerTree(const WebCore::RenderLayer*);
1332 void showLayerTree(const WebCore::RenderObject*); 1338 void showLayerTree(const WebCore::RenderObject*);
1333 #endif 1339 #endif
1334 1340
1335 #endif // RenderLayer_h 1341 #endif // RenderLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698