Chromium Code Reviews| Index: Source/core/rendering/RenderObject.h |
| diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h |
| index 4240104a777bbc1705e35be228d42a2f9e693870..68cd625b89dd77323b413a794bb1b07fce5f58a2 100644 |
| --- a/Source/core/rendering/RenderObject.h |
| +++ b/Source/core/rendering/RenderObject.h |
| @@ -115,6 +115,7 @@ enum InvalidationReason { |
| InvalidationScroll, |
| InvalidationSelection, |
| InvalidationLayer, |
| + InvalidationRendererInsertion, |
| InvalidationRendererRemoval, |
| InvalidationPaintRectangle |
| }; |
| @@ -831,9 +832,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 = InvalidationFull, MarkingBehavior = MarkContainingBlockChain); |
|
Julien - ping for review
2014/09/26 17:56:24
I am not a huge fan of this API:
- We can call set
Xianzhu
2014/09/26 18:36:21
Acknowledged.
|
| 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. |
| 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,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 |