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

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: Responding to Ian's comments 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 675fbc718bef1643c67778a5c9ce81ad96af06ce..233099d119bb22b2766264f3772ff74fc94bffad 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -62,6 +62,7 @@ class FilterOperations;
class HitTestRequest;
class HitTestResult;
class HitTestingTransformState;
+class PaintOrderLists;
class RenderFlowThread;
class RenderGeometryMap;
class RenderLayerBacking;
@@ -836,12 +837,17 @@ public:
bool isOutOfFlowRenderFlowThread() const { return renderer()->isOutOfFlowRenderFlowThread(); }
+ String paintOrderListsAsText();
shawnsingh 2013/04/18 02:22:14 Should this be const? Hopefully it's possible to
hartmanng 2013/04/18 17:14:00 Unfortunately it's not possible. We need to call c
+ PassRefPtr<PaintOrderLists> paintOrderLists();
shawnsingh 2013/04/18 02:22:14 Also should this be const? Hopefully it's possibl
hartmanng 2013/04/18 17:14:00 Same as above.
+
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
+ // layerToForceAsStackingContext parameter.
+ void rebuildZOrderLists(CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&, const RenderLayer* layerToForceAsStackingContext = 0);
void clearZOrderLists();
void updateNormalFlowList();
@@ -856,6 +862,11 @@ private:
bool acceleratedCompositingForOverflowScrollEnabled() const;
void updateDescendantsAreContiguousInStackingOrder();
void updateDescendantsAreContiguousInStackingOrderRecursive(const HashMap<const RenderLayer*, int>&, int& minIndex, int& maxIndex, int& count, bool firstIteration);
+ void collectBeforeAfterPromotionZOrderLists(RenderLayer* ancestorStackingContext,
+ OwnPtr<Vector<RenderLayer*> >& posZOrderListBeforePromote,
+ OwnPtr<Vector<RenderLayer*> >& negZOrderListBeforePromote,
+ OwnPtr<Vector<RenderLayer*> >& posZOrderListAfterPromote,
+ OwnPtr<Vector<RenderLayer*> >& negZOrderListAfterPromote);
void computeRepaintRects(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap* = 0);
void computeRepaintRectsIncludingDescendants();
@@ -912,7 +923,11 @@ private:
LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRenderBox(renderer())->location() : LayoutPoint(); }
- void collectLayers(bool includeHiddenLayers, CollectLayersBehavior, OwnPtr<Vector<RenderLayer*> >&, OwnPtr<Vector<RenderLayer*> >&);
+ // layerToForceAsStackingContext 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* layerToForceAsStackingContext = 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