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

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

Issue 593873002: Alternate way to track first paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adjust setShouldDoFullPaintInvalidationWithReason API Created 6 years, 3 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
« no previous file with comments | « Source/core/rendering/RenderLayerModelObject.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index d6ca80c9ec6ba09046894ad916749cf3417e68b7..38281267a91f570b9e645286cc792887148f34eb 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -117,6 +117,7 @@ enum InvalidationReason {
InvalidationScroll,
InvalidationSelection,
InvalidationLayer,
+ InvalidationRendererInsertion,
InvalidationRendererRemoval,
InvalidationPaintRectangle
};
@@ -833,9 +834,6 @@ public:
void getTextDecorations(unsigned decorations, AppliedTextDecoration& underline, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool quirksMode = false, bool firstlineStyle = false);
- void setHadPaintInvalidation();
- bool hadPaintInvalidation() const;
-
// Return the RenderLayerModelObject in the container chain which is responsible for painting this object, or 0
// if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation'
// methods.
@@ -1015,8 +1013,9 @@ public:
const LayoutPoint& previousPositionFromPaintInvalidationBacking() const { return m_previousPositionFromPaintInvalidationBacking; }
void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& positionFromPaintInvalidationBacking) { m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvalidationBacking; }
- bool shouldDoFullPaintInvalidation() const { return m_bitfields.shouldDoFullPaintInvalidation(); }
+ bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInvalidationReason() != InvalidationNone; }
void setShouldDoFullPaintInvalidation(bool, MarkingBehavior = MarkContainingBlockChain);
+ void setShouldDoFullPaintInvalidationWithReason(InvalidationReason, MarkingBehavior = MarkContainingBlockChain);
bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInvalidateOverflowForPaint(); }
@@ -1198,7 +1197,6 @@ private:
public:
RenderObjectBitfields(Node* node)
: m_selfNeedsLayout(false)
- , m_shouldDoFullPaintInvalidation(false)
, m_shouldInvalidateOverflowForPaint(false)
, m_shouldDoFullPaintInvalidationIfSelfPaintingLayer(false)
// FIXME: We should remove mayNeedPaintInvalidation once we are able to
@@ -1237,12 +1235,12 @@ private:
, m_selectionState(SelectionNone)
, m_flowThreadState(NotInsideFlowThread)
, m_boxDecorationBackgroundState(NoBoxDecorationBackground)
+ , m_fullPaintInvalidationReason(InvalidationNone)
{
}
- // 32 bits have been used in the first word, and 11 in the second.
+ // 32 bits have been used in the first word, and 14 in the second.
ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
- ADD_BOOLEAN_BITFIELD(shouldDoFullPaintInvalidation, ShouldDoFullPaintInvalidation);
ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateOverflowForPaint);
ADD_BOOLEAN_BITFIELD(shouldDoFullPaintInvalidationIfSelfPaintingLayer, ShouldDoFullPaintInvalidationIfSelfPaintingLayer);
ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation);
@@ -1290,6 +1288,7 @@ private:
unsigned m_selectionState : 3; // SelectionState
unsigned m_flowThreadState : 2; // FlowThreadState
unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundState
+ unsigned m_fullPaintInvalidationReason : 4; // InvalidationReason
public:
bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOfFlowPositioned; }
@@ -1311,6 +1310,9 @@ private:
ALWAYS_INLINE BoxDecorationBackgroundState boxDecorationBackgroundState() const { return static_cast<BoxDecorationBackgroundState>(m_boxDecorationBackgroundState); }
ALWAYS_INLINE void setBoxDecorationBackgroundState(BoxDecorationBackgroundState s) { m_boxDecorationBackgroundState = s; }
+
+ InvalidationReason fullPaintInvalidationReason() const { return static_cast<InvalidationReason>(m_fullPaintInvalidationReason); }
+ void setFullPaintInvalidationReason(InvalidationReason reason) { m_fullPaintInvalidationReason = reason; }
};
#undef ADD_BOOLEAN_BITFIELD
« no previous file with comments | « Source/core/rendering/RenderLayerModelObject.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698