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

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: More comments 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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/web/tests/WebFrameTest.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 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.
+ if (repaintLayer == RepaintLayer && hasLayer())
eseidel 2014/03/28 16:36:41 This repaint call is just wrong IMO. See crbug.co
setLayerNeedsFullRepaint();
}
}
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698