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

Unified Diff: Source/core/rendering/RenderLayer.h

Issue 13467028: Add an intermediate function to generate 2 paint-order lists. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix rebase mistake Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderLayer.h
diff --git a/Source/core/rendering/RenderLayer.h b/Source/core/rendering/RenderLayer.h
index 0ce7c4bfebb9293ef9169a82bf081f3b03b6cba3..2b02d52bb599ce06d7f929a073aa2109deda0a9e 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -818,12 +818,20 @@ public:
bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRenderFlowThread(); }
+#ifndef NDEBUG
+ String paintOrderListsAsText();
+#endif
+ PassRefPtr<NodeList> paintOrderListBeforePromote();
+ PassRefPtr<NodeList> paintOrderListAfterPromote();
+
private:
enum CollectLayersBehavior { StopAtStackingContexts, StopAtStackingContainers };
void updateZOrderLists();
void rebuildZOrderLists();
- void rebuildZOrderLists(CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&);
+ // See the comment for collectLayers for information about the
+ // layerToForceAsStackingContainer parameter.
+ void rebuildZOrderLists(CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layerToForceAsStackingContainer = 0);
void clearZOrderLists();
void updateNormalFlowList();
@@ -838,6 +846,12 @@ private:
bool acceleratedCompositingForOverflowScrollEnabled() const;
void updateDescendantsAreContiguousInStackingOrder();
void updateDescendantsAreContiguousInStackingOrderRecursive(const HashMap<const RenderLayer*, int>&, int& minIndex, int& maxIndex, int& count, bool firstIteration);
+ void collectBeforePromotionZOrderList(RenderLayer* ancestorStackingContext,
+ OwnPtr<Vector<RenderLayer*> >& posZOrderListBeforePromote,
+ OwnPtr<Vector<RenderLayer*> >& negZOrderListBeforePromote);
+ void collectAfterPromotionZOrderList(RenderLayer* ancestorStackingContext,
+ OwnPtr<Vector<RenderLayer*> >& posZOrderListAfterPromote,
+ OwnPtr<Vector<RenderLayer*> >& negZOrderListAfterPromote);
void computeRepaintRects(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap* = 0);
void computeRepaintRectsIncludingDescendants();
@@ -894,7 +908,11 @@ private:
LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRenderBox(renderer())->location() : LayoutPoint(); }
- void collectLayers(bool includeHiddenLayers, CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&);
+ // layerToForceAsStackingContainer allows us to build pre-promotion and
+ // post-promotion layer lists, by allowing us to treat a layer as if it is a
+ // stacking context, without adding a new member to RenderLayer or modifying
+ // the style (which could cause extra allocations).
+ void collectLayers(bool includeHiddenLayers, CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layerToForceAsStackingContainer = 0);
struct LayerPaintingInfo {
LayerPaintingInfo(RenderLayer* inRootLayer, const LayoutRect& inDirtyRect, PaintBehavior inPaintBehavior, const LayoutSize& inSubPixelAccumulation, RenderObject* inPaintingRoot = 0, RenderRegion*inRegion = 0, OverlapTestRequestMap* inOverlapTestRequests = 0)

Powered by Google App Engine
This is Rietveld 408576698