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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.h

Issue 2732573003: Skip paint property update and visual rect update if no geometry change (Closed)
Patch Set: - Created 3 years, 9 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/paint/PaintInvalidator.h
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.h b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
index ddb0a2d33fa72c0385ea9a6c8c148e8a96dcf775..d261934e841c1a3aef648f59e02323d0ec36b448 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.h
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
@@ -44,7 +44,7 @@ struct PaintInvalidatorContext {
enum ForcedSubtreeInvalidationFlag {
ForcedSubtreeInvalidationChecking = 1 << 0,
- ForcedSubtreeInvalidationRectUpdate = 1 << 1,
+ ForcedSubtreeVisualRectUpdate = 1 << 1,
ForcedSubtreeFullInvalidation = 1 << 2,
ForcedSubtreeFullInvalidationForStackedContents = 1 << 3,
ForcedSubtreeSVGResourceChange = 1 << 4,
@@ -98,6 +98,9 @@ class PaintInvalidator {
// See the definition of PaintInvalidationDelayedFull for more details.
void processPendingDelayedPaintInvalidations();
+ bool needsVisualRectUpdate(const LayoutObject&,
+ const PaintInvalidatorContext&);
+
private:
ALWAYS_INLINE LayoutRect
computeVisualRectInBacking(const LayoutObject&,
@@ -108,6 +111,8 @@ class PaintInvalidator {
PaintInvalidatorContext&);
ALWAYS_INLINE void updatePaintInvalidationContainer(const LayoutObject&,
PaintInvalidatorContext&);
+ ALWAYS_INLINE void updateVisualRectIfNeeded(const LayoutObject&,
+ PaintInvalidatorContext&);
ALWAYS_INLINE void updateVisualRect(const LayoutObject&,
PaintInvalidatorContext&);

Powered by Google App Engine
This is Rietveld 408576698