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

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

Issue 1287093004: Slimming Paint phase 2 compositing algorithm plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase from space Created 5 years, 4 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/DisplayItemList.h
diff --git a/Source/platform/graphics/paint/DisplayItemList.h b/Source/platform/graphics/paint/DisplayItemList.h
index fb9798be017adb3e3d8d0e84f229a0e47e0e5a41..a6780c4ef636ec2561e1f1cc0e596c5edf6bc746 100644
--- a/Source/platform/graphics/paint/DisplayItemList.h
+++ b/Source/platform/graphics/paint/DisplayItemList.h
@@ -27,6 +27,10 @@ static const size_t kDisplayItemAlignment = WTF_ALIGN_OF(BeginTransform3DDisplay
static const size_t kInitialDisplayItemsCapacity = 64;
static const size_t kMaximumDisplayItemSize = sizeof(BeginTransform3DDisplayItem);
+// Map from SimpleLayer.startPoint to the DrawingDisplayItems within its range
+// which were invalidated on this frame and do not change SimpleLayers.
+using DisplayListDiff = HashMap<DisplayItemClient, DisplayItem*>;
+
using DisplayItems = ContiguousContainer<DisplayItem, kDisplayItemAlignment>;
class PLATFORM_EXPORT DisplayItemList {
@@ -70,8 +74,9 @@ public:
void endSkippingCache() { ASSERT(m_skippingCacheCount > 0); --m_skippingCacheCount; }
bool skippingCache() const { return m_skippingCacheCount; }
- // Must be called when a painting is finished.
- void commitNewDisplayItems();
+ // Must be called when a painting is finished. If passed, a DisplayListDiff
+ // is initialized and created.
+ void commitNewDisplayItems(DisplayListDiff* = 0);
// Returns the approximate memory usage, excluding memory likely to be
// shared with the embedder after copying to WebDisplayItemList.
@@ -90,6 +95,7 @@ public:
replay(context);
}
+ void appendToWebDisplayItemList(WebDisplayItemList*);
void commitNewDisplayItemsAndAppendToWebDisplayItemList(WebDisplayItemList*);
bool displayItemConstructionIsDisabled() const { return m_constructionDisabled; }
@@ -116,6 +122,7 @@ protected:
private:
friend class DisplayItemListTest;
friend class DisplayItemListPaintTest;
+ friend class DisplayItemListPaintTestForSlimmingPaintV2;
friend class LayoutObjectDrawingRecorderTest;
// Set new item state (scopes, cache skipping, etc) for a new item.
« no previous file with comments | « Source/platform/graphics/ContentLayerDelegate.cpp ('k') | Source/platform/graphics/paint/DisplayItemList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698