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

Unified Diff: Source/core/rendering/RenderObject.h

Issue 433603004: Disentangle repaint-after-compositing from updateLayerPositionsAfterLayout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tighten down invalidations Created 6 years, 5 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/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index 1cbb6445c83fdb3cde4465053662e57f248e38bf..6c014dc4690b15f228e40bb1f6991ee125daf9f4 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -33,6 +33,7 @@
#include "core/fetch/ImageResourceClient.h"
#include "core/html/HTMLElement.h"
#include "core/rendering/HitTestRequest.h"
+#include "core/rendering/PaintInvalidationState.h"
#include "core/rendering/PaintPhase.h"
#include "core/rendering/RenderObjectChildList.h"
#include "core/rendering/ScrollAlignment.h"
@@ -55,7 +56,6 @@ class HitTestLocation;
class HitTestResult;
class InlineBox;
class InlineFlowBox;
-class PaintInvalidationState;
class Position;
class PositionWithAffinity;
class PseudoStyleRequest;
@@ -859,7 +859,7 @@ public:
// Invalidate the paint of a specific subrectangle within a given object. The rect |r| is in the object's coordinate space.
void invalidatePaintRectangle(const LayoutRect&) const;
- bool invalidatePaintIfNeeded(const RenderLayerModelObject& paintInvalidationContainer,
+ InvalidationReason invalidatePaintIfNeeded(const RenderLayerModelObject& paintInvalidationContainer,
const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalidationContainer, const PaintInvalidationState&);
// Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint invalidation state.
@@ -1036,7 +1036,7 @@ public:
bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNeededPositionedMovementLayout(); }
void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeededPositionedMovementLayout(b); }
- void clearPaintInvalidationState();
+ void clearPaintInvalidationState(const PaintInvalidationState&);
// layoutDidGetCalled indicates whether this render object was re-laid-out
// since the last call to setLayoutDidGetCalled(false) on this object.
@@ -1056,7 +1056,12 @@ public:
bool neededLayoutBecauseOfChildren() const { return m_bitfields.neededLayoutBecauseOfChildren(); }
void setNeededLayoutBecauseOfChildren(bool b) { m_bitfields.setNeededLayoutBecauseOfChildren(b); }
- bool shouldCheckForPaintInvalidation()
+ bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInvalidationState)
+ {
+ return paintInvalidationState.forceCheckForPaintInvalidation() || shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState();
+ }
+
+ bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState()
{
return layoutDidGetCalled() || mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldDoFullPaintInvalidationIfSelfPaintingLayer();
}
@@ -1155,7 +1160,7 @@ private:
void markContainingBlockChainForPaintInvalidation()
{
- for (RenderObject* container = this->container(); container && !container->shouldCheckForPaintInvalidation(); container = container->container())
+ for (RenderObject* container = this->container(); container && !container->shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState(); container = container->container())
container->setMayNeedPaintInvalidation(true);
}

Powered by Google App Engine
This is Rietveld 408576698