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

Unified Diff: Source/core/compositing/DisplayListCompositingBuilder.cpp

Issue 1238123004: Slimming Paint phase 2 compositing algorithm plumbing & skeleton display list API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/compositing/DisplayListCompositingBuilder.cpp
diff --git a/Source/core/compositing/DisplayListCompositingBuilder.cpp b/Source/core/compositing/DisplayListCompositingBuilder.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..de9f037187dbf4841e4955218e6c04bc425db031
--- /dev/null
+++ b/Source/core/compositing/DisplayListCompositingBuilder.cpp
@@ -0,0 +1,41 @@
+// 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.
+
+#include "config.h"
+#include "core/compositing/DisplayListCompositingBuilder.h"
+
+#include "platform/graphics/paint/DisplayItemTransformTreeBuilder.h"
+#include "platform/graphics/paint/DisplayList.h"
+
+namespace blink {
+
+void DisplayListCompositingBuilder::build()
+{
+ DisplayItemTransformTreeBuilder transformTreeBuilder;
pdr. 2015/07/24 05:37:51 Can you talk a bit about how fixed position diffs
chrishtr 2015/07/24 14:53:45 Fixed position display items would be emitted as t
+ transformTreeBuilder.build(m_displayItemList, m_displayListDiff);
+ m_transformTree = transformTreeBuilder.releaseTransformTree();
+
+ buildGraphicsLayerTree();
+
+ m_rootGraphicsLayer.setTransformTree(m_transformTree.release());
+}
+
+void DisplayListCompositingBuilder::buildGraphicsLayerTree()
+{
+ // TODO(chrishtr): implement by walking the display list and transform tree, plus additional hints, to decide layerization,
+ // including overlap testing and optimizations such as squashing.
+
+ // Also create a DisplayList for each graphics layer that is a sliced window into the DisplayItemList for the page.
+
+ // And add pixel refs.
+
+ // Trivial implementation with only one composited layer:
+ OwnPtr<DisplayList> displayList = adoptPtr(new DisplayList(m_displayItemList));
+ for (unsigned i = 0; i < m_displayItemList.displayItems().size(); i++) {
+ displayList->offsets.append(i);
+ }
+ m_rootGraphicsLayer.setDisplayList(displayList.release());
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698