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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2095013003: Changes in DisplayItemClient for spv2 paint invalidation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to DisplayItemClient Created 4 years, 6 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: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 915e7e4c6115a034120284471ad4ff2d47eec0ef..d2afbb74606fd5f181b60bb64503bfe2932e6a6d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -116,17 +116,16 @@ LayoutObject::SetLayoutNeededForbiddenScope::~SetLayoutNeededForbiddenScope()
}
#endif
-struct SameSizeAsLayoutObject {
+struct SameSizeAsLayoutObject : DisplayItemClient {
virtual ~SameSizeAsLayoutObject() { } // Allocate vtable pointer.
+ LayoutPoint position;
+ LayoutRect rect;
void* pointers[6];
#if ENABLE(ASSERT)
unsigned m_debugBitfields : 2;
#endif
unsigned m_bitfields;
unsigned m_bitfields2;
- LayoutRect rect; // Stores the previous paint invalidation rect.
- LayoutPoint position; // Stores the previous position from the paint invalidation container.
- DisplayItemCacheGeneration cacheGeneration;
chrishtr 2016/06/27 21:09:08 Won't m_cacheGenerationOrInvalidationReason still
Xianzhu 2016/06/27 21:34:54 Yes, it's still there.
};
static_assert(sizeof(LayoutObject) == sizeof(SameSizeAsLayoutObject), "LayoutObject should stay small");
@@ -1199,7 +1198,7 @@ void LayoutObject::invalidateDisplayItemClient(const DisplayItemClient& client,
// various ways (e.g. PaintInvalidatinState::enclosingSelfPaintingLayer()) to reduce the cost.
DCHECK(!paintingLayer() || paintingLayer()->needsRepaint());
- client.setDisplayItemsUncached();
+ client.setDisplayItemsUncached(reason);
if (FrameView* frameView = this->frameView())
frameView->trackObjectPaintInvalidation(client, reason);

Powered by Google App Engine
This is Rietveld 408576698