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

Unified Diff: Source/platform/graphics/ContentLayerDelegate.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/platform/graphics/ContentLayerDelegate.cpp
diff --git a/Source/platform/graphics/ContentLayerDelegate.cpp b/Source/platform/graphics/ContentLayerDelegate.cpp
index 657ecb92854104a0c810de448a4d56e21085ef67..ee11c43bd5876140c25da2fa7a60e237d23ec6eb 100644
--- a/Source/platform/graphics/ContentLayerDelegate.cpp
+++ b/Source/platform/graphics/ContentLayerDelegate.cpp
@@ -33,6 +33,7 @@
#include "platform/geometry/IntRect.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/paint/DisplayItemList.h"
+#include "platform/graphics/paint/DisplayList.h"
#include "platform/transforms/AffineTransform.h"
#include "platform/transforms/TransformationMatrix.h"
#include "public/platform/WebDisplayItemList.h"
@@ -90,6 +91,16 @@ void ContentLayerDelegate::paintContents(
ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
+ if (RuntimeEnabledFeatures::slimmingPaintCompositorLayerizationEnabled()) {
+ // Scrollbars for the root frame stil paint in the old way, and don't have a displayList().
+ if (m_painter->displayList()) {
+ for (unsigned i = 0; i < m_painter->displayList()->size(); i++) {
+ m_painter->displayList()->displayItemInternal(i).appendToWebDisplayItemList(webDisplayItemList);
weiliangc 2015/07/24 19:17:15 Is it possible that this line changes the order of
chrishtr 2015/07/24 19:27:21 I think we should end up with representation in wh
+ }
+ return;
+ }
+ }
+
DisplayItemList* displayItemList = m_painter->displayItemList();
ASSERT(displayItemList);
displayItemList->setDisplayItemConstructionIsDisabled(
@@ -116,4 +127,14 @@ size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const
return m_painter->displayItemList()->approximateUnsharedMemoryUsage();
}
+const WebDisplayList* ContentLayerDelegate::displayList() const
+{
+ return m_painter->displayList();
+}
+
+const WebDisplayItemTransformTree* ContentLayerDelegate::transformTree() const
+{
+ return 0;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698