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

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

Issue 213103003: Optimize repaint on FrameView resize (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nullptr Created 6 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: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index 7ffb86cf19aca82d227df40ec668be67628ae97a..5d51dde2a689f4a342eacbd084da78b94a3b5b97 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -104,6 +104,11 @@ enum MarkingBehavior {
MarkContainingBlockChain,
};
+enum RepaintLayerBehavior {
+ RepaintLayer,
+ DontRepaintLayer,
+};
+
enum MapCoordinatesMode {
IsFixed = 1 << 0,
UseTransforms = 1 << 1,
@@ -611,7 +616,7 @@ public:
Element* offsetParent() const;
void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObject* newRoot = 0, SubtreeLayoutScope* = 0);
- void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayoutScope* = 0);
+ void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayoutScope* = 0, RepaintLayerBehavior = RepaintLayer);
void clearNeedsLayout();
void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayoutScope* = 0);
void setNeedsPositionedMovementLayout();
@@ -1269,7 +1274,7 @@ inline bool RenderObject::isBeforeOrAfterContent() const
return isBeforeContent() || isAfterContent();
}
-inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLayoutScope* layouter)
+inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLayoutScope* layouter, RepaintLayerBehavior repaintLayer)
{
ASSERT(!isSetNeedsLayoutForbidden());
bool alreadyNeededLayout = m_bitfields.selfNeedsLayout();
@@ -1277,7 +1282,8 @@ inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
if (!alreadyNeededLayout) {
if (markParents == MarkContainingBlockChain && (!layouter || layouter->root() != this))
markContainingBlocksForLayout(true, 0, layouter);
- if (hasLayer())
+ // FIXME: This may be incorrect, but needed at least because StyleDifferenceLayout implies repaint for now.
Julien - ping for review 2014/03/29 01:01:26 This is not strictly incorrect: it's conservative
Xianzhu 2014/03/30 22:26:53 Done.
+ if (repaintLayer == RepaintLayer && hasLayer())
setLayerNeedsFullRepaint();
}
}

Powered by Google App Engine
This is Rietveld 408576698