Index: Source/core/compositing/DisplayListCompositingBuilder.h |
diff --git a/Source/core/compositing/DisplayListCompositingBuilder.h b/Source/core/compositing/DisplayListCompositingBuilder.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..769c6721060f604095223cd159e30e5de67cab7e |
--- /dev/null |
+++ b/Source/core/compositing/DisplayListCompositingBuilder.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef DisplayListCompositingBuilder_h |
+#define DisplayListCompositingBuilder_h |
+ |
+#include "core/CoreExport.h" |
+#include "platform/graphics/GraphicsLayer.h" |
+#include "platform/graphics/paint/DisplayItemList.h" |
+#include "platform/graphics/paint/DisplayItemTransformTree.h" |
+ |
+namespace blink { |
+ |
+class DisplayListCompositingBuilder { |
+public: |
+ // The arguments to this method are the current frame's display list, the diff from the previous frame's display list, the graphics layer at the root of the |
+ // tree for this web view, and the property trees for the previous frame. |
+ DisplayListCompositingBuilder(const DisplayItemList& displayItemList, const DisplayListDiff& displayListDiff, GraphicsLayer& rootGraphicsLayer) |
+ : m_displayItemList(displayItemList), m_displayListDiff(displayListDiff) |
+ , m_rootGraphicsLayer(rootGraphicsLayer) |
+ { } |
+ |
+ // The effect of this method is an updated graphics layer tree (still rooted at |rootGraphicsLayer|), and property trees. |
+ // For graphics layers which are preserved across the update, raster invalidations are registered on them (via setNeedsDisplayInRect or setNeedsDisplay). |
+ void build(); |
+ |
+private: |
+ void buildGraphicsLayerTree(); |
+ |
+ const DisplayItemList& m_displayItemList; |
+ const DisplayListDiff& m_displayListDiff; |
+ GraphicsLayer& m_rootGraphicsLayer; |
+ OwnPtr<DisplayItemTransformTree> m_transformTree; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // DisplayListCompositingBuilder_h |