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

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: Fix a bug 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 f28fedfd783af02831e7a58a00040231eb7f4f93..5bd4b91aefb59054a88974c6302d19509b524812 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.
@@ -1017,8 +1015,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 = InvalidationFull, MarkingBehavior = MarkContainingBlockChain);
Julien - ping for review 2014/09/26 17:56:24 I don't think the default InvalidationReason is gi
Xianzhu 2014/09/26 18:36:21 - Removed the default value for InvalidationReason
bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInvalidateOverflowForPaint(); }
@@ -1200,7 +1199,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
@@ -1239,12 +1237,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.
Julien - ping for review 2014/09/26 17:56:24 Let's update the number of remaining bits please!
Xianzhu 2014/09/26 18:36:21 Done.
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);
@@ -1292,6 +1290,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; }
@@ -1313,6 +1312,13 @@ 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)
+ {
+ ASSERT(reason != InvalidationIncremental);
+ 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