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

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: UMA + bug 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 706
707 void* operator new(size_t); 707 void* operator new(size_t);
708 // Only safe to call from RenderLayerModelObject::destroyLayer() 708 // Only safe to call from RenderLayerModelObject::destroyLayer()
709 void operator delete(void*); 709 void operator delete(void*);
710 710
711 bool isComposited() const { return m_backing != 0; } 711 bool isComposited() const { return m_backing != 0; }
712 bool hasCompositedMask() const; 712 bool hasCompositedMask() const;
713 RenderLayerBacking* backing() const { return m_backing.get(); } 713 RenderLayerBacking* backing() const { return m_backing.get(); }
714 RenderLayerBacking* ensureBacking(); 714 RenderLayerBacking* ensureBacking();
715 void clearBacking(bool layerBeingDestroyed = false); 715 void clearBacking(bool layerBeingDestroyed = false);
716 bool adjustForForceCompositedScrollingMode(bool) const;
716 bool needsCompositedScrolling() const; 717 bool needsCompositedScrolling() const;
717 bool needsToBeStackingContainer() const; 718 bool needsToBeStackingContainer() const;
718 719
719 bool hasScrollParent() const; 720 bool hasScrollParent() const;
720 721
721 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const RenderStyle* newStyle) const; 722 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const RenderStyle* newStyle) const;
722 bool needsCompositingLayersRebuiltForOverflow(const RenderStyle* oldStyle, c onst RenderStyle* newStyle) const; 723 bool needsCompositingLayersRebuiltForOverflow(const RenderStyle* oldStyle, c onst RenderStyle* newStyle) const;
723 bool needsCompositingLayersRebuiltForFilters(const RenderStyle* oldStyle, co nst RenderStyle* newStyle, bool didPaintWithFilters) const; 724 bool needsCompositingLayersRebuiltForFilters(const RenderStyle* oldStyle, co nst RenderStyle* newStyle, bool didPaintWithFilters) const;
724 725
725 bool paintsWithTransparency(PaintBehavior paintBehavior) const 726 bool paintsWithTransparency(PaintBehavior paintBehavior) const
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 831
831 void setAncestorChainHasSelfPaintingLayerDescendant(); 832 void setAncestorChainHasSelfPaintingLayerDescendant();
832 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 833 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
833 834
834 void setAncestorChainHasOutOfFlowPositionedDescendant(); 835 void setAncestorChainHasOutOfFlowPositionedDescendant();
835 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); 836 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
836 837
837 bool acceleratedCompositingForOverflowScrollEnabled() const; 838 bool acceleratedCompositingForOverflowScrollEnabled() const;
838 // FIXME: This is a temporary flag and should be removed once accelerated 839 // FIXME: This is a temporary flag and should be removed once accelerated
839 // overflow scroll is ready (crbug.com/254111). 840 // overflow scroll is ready (crbug.com/254111).
841 bool useCompositorDrivenAcceleratedScrolling() const;
840 bool compositorDrivenAcceleratedScrollingEnabled() const; 842 bool compositorDrivenAcceleratedScrollingEnabled() const;
841 void updateCanBeStackingContainer(); 843 void updateCanBeStackingContainer();
842 void collectBeforePromotionZOrderList(RenderLayer* ancestorStackingContext, OwnPtr<Vector<RenderLayer*> >& posZOrderListBeforePromote, OwnPtr<Vector<RenderL ayer*> >& negZOrderListBeforePromote); 844 void collectBeforePromotionZOrderList(RenderLayer* ancestorStackingContext, OwnPtr<Vector<RenderLayer*> >& posZOrderListBeforePromote, OwnPtr<Vector<RenderL ayer*> >& negZOrderListBeforePromote);
843 void collectAfterPromotionZOrderList(RenderLayer* ancestorStackingContext, O wnPtr<Vector<RenderLayer*> >& posZOrderListAfterPromote, OwnPtr<Vector<RenderLay er*> >& negZOrderListAfterPromote); 845 void collectAfterPromotionZOrderList(RenderLayer* ancestorStackingContext, O wnPtr<Vector<RenderLayer*> >& posZOrderListAfterPromote, OwnPtr<Vector<RenderLay er*> >& negZOrderListAfterPromote);
844 846
845 void dirtyNormalFlowListCanBePromotedToStackingContainer(); 847 void dirtyNormalFlowListCanBePromotedToStackingContainer();
846 void dirtySiblingStackingContextCanBePromotedToStackingContainer(); 848 void dirtySiblingStackingContextCanBePromotedToStackingContainer();
847 849
848 void computeRepaintRects(const RenderLayerModelObject* repaintContainer, con st RenderGeometryMap* = 0); 850 void computeRepaintRects(const RenderLayerModelObject* repaintContainer, con st RenderGeometryMap* = 0);
849 void computeRepaintRectsIncludingDescendants(); 851 void computeRepaintRectsIncludingDescendants();
850 void clearRepaintRects(); 852 void clearRepaintRects();
851 853
852 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&, 854 void clipToRect(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&,
853 BorderRadiusClippingRule = IncludeSelfForBorderRadius); 855 BorderRadiusClippingRule = IncludeSelfForBorderRadius);
854 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C lipRect&); 856 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C lipRect&);
855 857
856 bool shouldRepaintAfterLayout() const; 858 bool shouldRepaintAfterLayout() const;
857 859
858 void updateSelfPaintingLayer(); 860 void updateSelfPaintingLayer();
859 void updateIsNormalFlowOnly(); 861 void updateIsNormalFlowOnly();
860 void updateVisibilityAfterStyleChange(const RenderStyle* oldStyle); 862 void updateVisibilityAfterStyleChange(const RenderStyle* oldStyle);
861 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle); 863 void updateStackingContextsAfterStyleChange(const RenderStyle* oldStyle);
862 864
863 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle); 865 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle);
864 void updateScrollbarsAfterLayout(); 866 void updateScrollbarsAfterLayout();
865 867
866 void updateOutOfFlowPositioned(const RenderStyle* oldStyle); 868 void updateOutOfFlowPositioned(const RenderStyle* oldStyle);
867 869
868 void setNeedsCompositedScrolling(bool); 870 bool setNeedsCompositedScrolling(bool);
871 bool setNeedsToBeStackingContainer(bool);
869 void didUpdateNeedsCompositedScrolling(); 872 void didUpdateNeedsCompositedScrolling();
870 873
871 // Returns true if the position changed. 874 // Returns true if the position changed.
872 bool updateLayerPosition(); 875 bool updateLayerPosition();
873 876
874 void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags = defaultFlags); 877 void updateLayerPositions(RenderGeometryMap* = 0, UpdateLayerPositionsFlags = defaultFlags);
875 878
876 enum UpdateLayerPositionsAfterScrollFlag { 879 enum UpdateLayerPositionsAfterScrollFlag {
877 NoFlag = 0, 880 NoFlag = 0,
878 IsOverflowScroll = 1 << 0, 881 IsOverflowScroll = 1 << 0,
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 1125
1123 // This is true if we have an out-of-flow positioned descendant whose 1126 // This is true if we have an out-of-flow positioned descendant whose
1124 // containing block is our ancestor. If this is the case, the descendant 1127 // containing block is our ancestor. If this is the case, the descendant
1125 // may fall outside of our clip preventing things like opting into 1128 // may fall outside of our clip preventing things like opting into
1126 // composited scrolling (which causes clipping of all descendants). 1129 // composited scrolling (which causes clipping of all descendants).
1127 unsigned m_hasUnclippedDescendant : 1; 1130 unsigned m_hasUnclippedDescendant : 1;
1128 1131
1129 unsigned m_isUnclippedDescendant : 1; 1132 unsigned m_isUnclippedDescendant : 1;
1130 1133
1131 unsigned m_needsCompositedScrolling : 1; 1134 unsigned m_needsCompositedScrolling : 1;
1132 unsigned m_needsCompositedScrollingHasBeenRecorded : 1; 1135 unsigned m_needsToBeStackingContainerHasBeenRecorded : 1;
1133 unsigned m_willUseCompositedScrollingHasBeenRecorded : 1; 1136 unsigned m_willUseCompositedScrollingHasBeenRecorded : 1;
1134 1137
1135 unsigned m_isScrollableAreaHasBeenRecorded : 1; 1138 unsigned m_isScrollableAreaHasBeenRecorded : 1;
1136 1139
1140 unsigned m_needsToBeStackingContainer : 1;
1141
1137 // If this is true, then no non-descendant appears between any of our 1142 // If this is true, then no non-descendant appears between any of our
1138 // descendants in stacking order. This is one of the requirements of being 1143 // descendants in stacking order. This is one of the requirements of being
1139 // able to safely become a stacking context. 1144 // able to safely become a stacking context.
1140 unsigned m_canBePromotedToStackingContainer : 1; 1145 unsigned m_canBePromotedToStackingContainer : 1;
1141 unsigned m_canBePromotedToStackingContainerDirty : 1; 1146 unsigned m_canBePromotedToStackingContainerDirty : 1;
1142 1147
1143 const unsigned m_isRootLayer : 1; 1148 const unsigned m_isRootLayer : 1;
1144 1149
1145 unsigned m_usedTransparency : 1; // Tracks whether we need to close a transp arent layer, i.e., whether 1150 unsigned m_usedTransparency : 1; // Tracks whether we need to close a transp arent layer, i.e., whether
1146 // we ended up painting this layer or any desce ndants (and therefore need to 1151 // we ended up painting this layer or any desce ndants (and therefore need to
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 1311
1307 } // namespace WebCore 1312 } // namespace WebCore
1308 1313
1309 #ifndef NDEBUG 1314 #ifndef NDEBUG
1310 // Outside the WebCore namespace for ease of invocation from gdb. 1315 // Outside the WebCore namespace for ease of invocation from gdb.
1311 void showLayerTree(const WebCore::RenderLayer*); 1316 void showLayerTree(const WebCore::RenderLayer*);
1312 void showLayerTree(const WebCore::RenderObject*); 1317 void showLayerTree(const WebCore::RenderObject*);
1313 #endif 1318 #endif
1314 1319
1315 #endif // RenderLayer_h 1320 #endif // RenderLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698