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

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

Issue 16896019: Replace RenderArena with PartitionAlloc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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) 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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 TransformationMatrix perspectiveTransform() const; 771 TransformationMatrix perspectiveTransform() const;
772 FloatPoint perspectiveOrigin() const; 772 FloatPoint perspectiveOrigin() const;
773 bool preserves3D() const { return renderer()->style()->transformStyle3D() == TransformStyle3DPreserve3D; } 773 bool preserves3D() const { return renderer()->style()->transformStyle3D() == TransformStyle3DPreserve3D; }
774 bool has3DTransform() const { return m_transform && !m_transform->isAffine() ; } 774 bool has3DTransform() const { return m_transform && !m_transform->isAffine() ; }
775 775
776 virtual void filterNeedsRepaint(); 776 virtual void filterNeedsRepaint();
777 bool hasFilter() const { return renderer()->hasFilter(); } 777 bool hasFilter() const { return renderer()->hasFilter(); }
778 778
779 bool hasBlendMode() const; 779 bool hasBlendMode() const;
780 780
781 // Overloaded new operator. Derived classes must override operator new 781 #if ENABLE(PARTITION_ALLOC)
782 // in order to allocate out of the RenderArena. 782 void* operator new(size_t);
783 void* operator new(size_t, RenderArena*); 783 #endif
784
785 // Overridden to prevent the normal delete from being called.
786 void operator delete(void*, size_t);
787 784
788 bool isComposited() const { return m_backing != 0; } 785 bool isComposited() const { return m_backing != 0; }
789 bool hasCompositedMask() const; 786 bool hasCompositedMask() const;
790 RenderLayerBacking* backing() const { return m_backing.get(); } 787 RenderLayerBacking* backing() const { return m_backing.get(); }
791 RenderLayerBacking* ensureBacking(); 788 RenderLayerBacking* ensureBacking();
792 void clearBacking(bool layerBeingDestroyed = false); 789 void clearBacking(bool layerBeingDestroyed = false);
793 virtual GraphicsLayer* layerForScrolling() const; 790 virtual GraphicsLayer* layerForScrolling() const;
794 virtual GraphicsLayer* layerForHorizontalScrollbar() const; 791 virtual GraphicsLayer* layerForHorizontalScrollbar() const;
795 virtual GraphicsLayer* layerForVerticalScrollbar() const; 792 virtual GraphicsLayer* layerForVerticalScrollbar() const;
796 virtual GraphicsLayer* layerForScrollCorner() const; 793 virtual GraphicsLayer* layerForScrollCorner() const;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 865
869 enum ForceNeedsCompositedScrollingMode { 866 enum ForceNeedsCompositedScrollingMode {
870 DoNotForceCompositedScrolling = 0, 867 DoNotForceCompositedScrolling = 0,
871 CompositedScrollingAlwaysOn = 1, 868 CompositedScrollingAlwaysOn = 1,
872 CompositedScrollingAlwaysOff = 2 869 CompositedScrollingAlwaysOff = 2
873 }; 870 };
874 871
875 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode); 872 void setForceNeedsCompositedScrolling(ForceNeedsCompositedScrollingMode);
876 873
877 private: 874 private:
875 #if ENABLE(PARTITION_ALLOC)
876 void operator delete(void*);
877 #endif
878
878 enum CollectLayersBehavior { 879 enum CollectLayersBehavior {
879 ForceLayerToStackingContainer, 880 ForceLayerToStackingContainer,
880 OverflowScrollCanBeStackingContainers, 881 OverflowScrollCanBeStackingContainers,
881 OnlyStackingContextsCanBeStackingContainers 882 OnlyStackingContextsCanBeStackingContainers
882 }; 883 };
883 884
884 void updateZOrderLists(); 885 void updateZOrderLists();
885 void rebuildZOrderLists(); 886 void rebuildZOrderLists();
886 // See the comment for collectLayers for information about the layerToForceA sStackingContainer parameter. 887 // See the comment for collectLayers for information about the layerToForceA sStackingContainer parameter.
887 void rebuildZOrderLists(OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<Render Layer*> >&, const RenderLayer* layerToForceAsStackingContainer = 0, CollectLayer sBehavior = OverflowScrollCanBeStackingContainers); 888 void rebuildZOrderLists(OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<Render Layer*> >&, const RenderLayer* layerToForceAsStackingContainer = 0, CollectLayer sBehavior = OverflowScrollCanBeStackingContainers);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 HasChangedAncestor = 1 << 3 945 HasChangedAncestor = 1 << 3
945 }; 946 };
946 typedef unsigned UpdateLayerPositionsAfterScrollFlags; 947 typedef unsigned UpdateLayerPositionsAfterScrollFlags;
947 void updateLayerPositionsAfterScroll(RenderGeometryMap*, UpdateLayerPosition sAfterScrollFlags = NoFlag); 948 void updateLayerPositionsAfterScroll(RenderGeometryMap*, UpdateLayerPosition sAfterScrollFlags = NoFlag);
948 949
949 friend IntSize RenderBox::scrolledContentOffset() const; 950 friend IntSize RenderBox::scrolledContentOffset() const;
950 IntSize scrolledContentOffset() const { return m_scrollOffset; } 951 IntSize scrolledContentOffset() const { return m_scrollOffset; }
951 952
952 IntSize clampScrollOffset(const IntSize&) const; 953 IntSize clampScrollOffset(const IntSize&) const;
953 954
954 // The normal operator new is disallowed on all render objects.
955 void* operator new(size_t) throw();
956
957 void setNextSibling(RenderLayer* next) { m_next = next; } 955 void setNextSibling(RenderLayer* next) { m_next = next; }
958 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; } 956 void setPreviousSibling(RenderLayer* prev) { m_previous = prev; }
959 void setParent(RenderLayer* parent); 957 void setParent(RenderLayer* parent);
960 void setFirstChild(RenderLayer* first) { m_first = first; } 958 void setFirstChild(RenderLayer* first) { m_first = first; }
961 void setLastChild(RenderLayer* last) { m_last = last; } 959 void setLastChild(RenderLayer* last) { m_last = last; }
962 960
963 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende rBox(renderer())->location() : LayoutPoint(); } 961 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende rBox(renderer())->location() : LayoutPoint(); }
964 962
965 // layerToForceAsStackingContainer allows us to build pre-promotion and 963 // layerToForceAsStackingContainer allows us to build pre-promotion and
966 // post-promotion layer lists, by allowing us to treat a layer as if it is a 964 // post-promotion layer lists, by allowing us to treat a layer as if it is a
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 void setCompositingReasons(CompositingReasons reasons) { m_compositingProper ties.compositingReasons = reasons; } 1139 void setCompositingReasons(CompositingReasons reasons) { m_compositingProper ties.compositingReasons = reasons; }
1142 CompositingReasons compositingReasons() const { return m_compositingProperti es.compositingReasons; } 1140 CompositingReasons compositingReasons() const { return m_compositingProperti es.compositingReasons; }
1143 1141
1144 // Returns true if z ordering would not change if this layer were a stacking container. 1142 // Returns true if z ordering would not change if this layer were a stacking container.
1145 bool canBeStackingContainer() const; 1143 bool canBeStackingContainer() const;
1146 1144
1147 friend class RenderLayerBacking; 1145 friend class RenderLayerBacking;
1148 friend class RenderLayerCompositor; 1146 friend class RenderLayerCompositor;
1149 friend class RenderLayerModelObject; 1147 friend class RenderLayerModelObject;
1150 1148
1151 // Only safe to call from RenderBoxModelObject::destroyLayer(RenderArena*) 1149 // Only safe to call from RenderBoxModelObject::destroyLayer()
1152 void destroy(RenderArena*); 1150 void destroy();
1153 1151
1154 LayoutUnit overflowTop() const; 1152 LayoutUnit overflowTop() const;
1155 LayoutUnit overflowBottom() const; 1153 LayoutUnit overflowBottom() const;
1156 LayoutUnit overflowLeft() const; 1154 LayoutUnit overflowLeft() const;
1157 LayoutUnit overflowRight() const; 1155 LayoutUnit overflowRight() const;
1158 1156
1159 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const; 1157 IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const;
1160 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const; 1158 IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const;
1161 1159
1162 LayoutUnit verticalScrollbarStart(int minX, int maxX) const; 1160 LayoutUnit verticalScrollbarStart(int minX, int maxX) const;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 1368
1371 } // namespace WebCore 1369 } // namespace WebCore
1372 1370
1373 #ifndef NDEBUG 1371 #ifndef NDEBUG
1374 // Outside the WebCore namespace for ease of invocation from gdb. 1372 // Outside the WebCore namespace for ease of invocation from gdb.
1375 void showLayerTree(const WebCore::RenderLayer*); 1373 void showLayerTree(const WebCore::RenderLayer*);
1376 void showLayerTree(const WebCore::RenderObject*); 1374 void showLayerTree(const WebCore::RenderObject*);
1377 #endif 1375 #endif
1378 1376
1379 #endif // RenderLayer_h 1377 #endif // RenderLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698