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

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

Issue 1585823002: Improve performance when calling PaintLayer::setNeedsRepaint() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@RemoveVisualRect
Patch Set: Created 4 years, 11 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/PaintInvalidationState.cpp
diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
index 86d5be22199f4895838dfab82c3ffd4eef60d642..58a7a965eda3ab698a1b163c88c82b0d65a34e75 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
@@ -20,6 +20,7 @@ PaintInvalidationState::PaintInvalidationState(const LayoutView& layoutView, Vec
, m_viewClippingAndScrollOffsetDisabled(false)
, m_paintInvalidationContainer(layoutView.containerForPaintInvalidation())
, m_pendingDelayedPaintInvalidations(pendingDelayedPaintInvalidations)
+ , m_enclosingLayer(*layoutView.layer())
{
bool establishesPaintInvalidationContainer = layoutView == m_paintInvalidationContainer;
if (!establishesPaintInvalidationContainer) {
@@ -46,6 +47,7 @@ PaintInvalidationState::PaintInvalidationState(PaintInvalidationState& next, Lay
, m_viewClippingAndScrollOffsetDisabled(false)
, m_paintInvalidationContainer(paintInvalidationContainer)
, m_pendingDelayedPaintInvalidations(next.pendingDelayedPaintInvalidationTargets())
+ , m_enclosingLayer(layoutObject.hasLayer() ? *layoutObject.layer() : next.enclosingLayer())
{
// FIXME: SVG could probably benefit from a stack-based optimization like html does. crbug.com/391054
bool establishesPaintInvalidationContainer = layoutObject == m_paintInvalidationContainer;
@@ -107,6 +109,7 @@ PaintInvalidationState::PaintInvalidationState(PaintInvalidationState& next, con
, m_paintOffset(next.m_paintOffset)
, m_paintInvalidationContainer(next.m_paintInvalidationContainer)
, m_pendingDelayedPaintInvalidations(next.pendingDelayedPaintInvalidationTargets())
+ , m_enclosingLayer(next.enclosingLayer())
{
ASSERT(layoutObject != m_paintInvalidationContainer);

Powered by Google App Engine
This is Rietveld 408576698