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

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

Issue 1950573003: Improve handling of PaintInvalidationLayer (renamed to PaintInvalidationSubtree) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@LocationChange
Patch Set: Created 4 years, 7 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.h
diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.h b/third_party/WebKit/Source/core/layout/PaintInvalidationState.h
index 31759c8e2e879a11cd3019d8fe898f88df53c62a..8ab40a46aab57411b83bfe3a0890be6d378f4e86 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.h
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.h
@@ -7,6 +7,7 @@
#include "core/CoreExport.h"
#include "platform/geometry/LayoutRect.h"
+#include "platform/graphics/PaintInvalidationReason.h"
#include "platform/transforms/AffineTransform.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
@@ -51,13 +52,17 @@ public:
// local space (border box space for LayoutBoxes). After invalidation of the current object,
// before invalidation of the subtrees, this method must be called to apply clip and scroll offset
// etc. for creating child PaintInvalidationStates.
- void updateForChildren();
+ void updateForChildren(PaintInvalidationReason);
- bool forcedSubtreeInvalidationWithinContainer() const { return m_forcedSubtreeInvalidationWithinContainer; }
- void setForceSubtreeInvalidationWithinContainer() { m_forcedSubtreeInvalidationWithinContainer = true; }
+ bool hasForcedSubtreeInvalidationFlags() const { return m_forcedSubtreeInvalidationFlags; }
- bool forcedSubtreeInvalidationRectUpdateWithinContainer() const { return m_forcedSubtreeInvalidationRectUpdateWithinContainer; }
- void setForceSubtreeInvalidationRectUpdateWithinContainer() { m_forcedSubtreeInvalidationRectUpdateWithinContainer = true; }
+ bool forcedSubtreeInvalidationCheckingWithinContainer() const { return m_forcedSubtreeInvalidationFlags & InvalidationChecking; }
+ void setForceSubtreeInvalidationCheckingWithinContainer() { m_forcedSubtreeInvalidationFlags |= InvalidationChecking; }
+
+ bool forcedSubtreeFullInvalidationWithinContainer() const { return m_forcedSubtreeInvalidationFlags & FullInvalidation; }
+
+ bool forcedSubtreeInvalidationRectUpdateWithinContainerOnly() const { return m_forcedSubtreeInvalidationFlags == InvalidationRectUpdate; }
+ void setForceSubtreeInvalidationRectUpdateWithinContainer() { m_forcedSubtreeInvalidationFlags |= InvalidationRectUpdate; }
const LayoutBoxModelObject& paintInvalidationContainer() const { return *m_paintInvalidationContainer; }
@@ -95,8 +100,13 @@ private:
const LayoutObject& m_currentObject;
- bool m_forcedSubtreeInvalidationWithinContainer;
- bool m_forcedSubtreeInvalidationRectUpdateWithinContainer;
+ enum ForcedSubtreeInvalidationFlag {
+ InvalidationChecking = 1 << 0,
+ InvalidationRectUpdate = 1 << 1,
+ FullInvalidation = 1 << 2,
+ FullInvalidationForStackedContents = 1 << 3,
+ };
+ unsigned m_forcedSubtreeInvalidationFlags;
bool m_clipped;
bool m_clippedForAbsolutePosition;

Powered by Google App Engine
This is Rietveld 408576698