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

Unified Diff: Source/platform/graphics/paint/DisplayList.h

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/platform/graphics/paint/DisplayList.h
diff --git a/Source/platform/graphics/paint/DisplayList.h b/Source/platform/graphics/paint/DisplayList.h
new file mode 100644
index 0000000000000000000000000000000000000000..ff1f00af680b980b9ba73b8cac5833325c9acc92
--- /dev/null
+++ b/Source/platform/graphics/paint/DisplayList.h
@@ -0,0 +1,36 @@
+// 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 DisplayList_h
+#define DisplayList_h
+
+#include "platform/PlatformExport.h"
+#include "platform/graphics/paint/DisplayItemList.h"
+#include "public/platform/WebDisplayList.h"
+#include "wtf/Vector.h"
+
+namespace blink {
+
+class DisplayList : public WebDisplayList {
+public:
+ DisplayList(const DisplayItemList& displayItemList) : m_displayItemList(displayItemList) { }
+ unsigned size() const override { return offsets.size(); }
+ const WebDisplayItem& displayItem(unsigned index) const
+ {
+ return *m_displayItemList.displayItems().elementAt(offsets[index]);
+ }
+
+ // This is temporary.
+ const DisplayItem& displayItemInternal(unsigned index) const
+ {
+ return *m_displayItemList.displayItems().elementAt(offsets[index]);
+ }
+ Vector<unsigned> offsets;
weiliangc 2015/07/24 19:17:15 Maybe we should have more check to what we put int
chrishtr 2015/07/24 19:27:22 Yes. Getting these right is important.
+private:
+ const DisplayItemList& m_displayItemList;
+};
+
+} // namespace blink
+
+#endif // DisplayList_h

Powered by Google App Engine
This is Rietveld 408576698