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

Side by Side Diff: Source/core/rendering/RenderObject.h

Issue 160903002: Move RenderLayer repainting to repaint-after-layout framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Rebase to master 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 RespectImageOrientationEnum shouldRespectImageOrientation() const; 969 RespectImageOrientationEnum shouldRespectImageOrientation() const;
970 970
971 bool isRelayoutBoundaryForInspector() const; 971 bool isRelayoutBoundaryForInspector() const;
972 972
973 const LayoutRect& newRepaintRect() const { return m_newRepaintRect; } 973 const LayoutRect& newRepaintRect() const { return m_newRepaintRect; }
974 void setNewRepaintRect(const LayoutRect& rect) { m_newRepaintRect = rect; } 974 void setNewRepaintRect(const LayoutRect& rect) { m_newRepaintRect = rect; }
975 975
976 const LayoutRect& oldRepaintRect() const { return m_oldRepaintRect; } 976 const LayoutRect& oldRepaintRect() const { return m_oldRepaintRect; }
977 void setOldRepaintRect(const LayoutRect& rect) { m_oldRepaintRect = rect; } 977 void setOldRepaintRect(const LayoutRect& rect) { m_oldRepaintRect = rect; }
978 978
979 LayoutRect newOutlineRect();
980 void setNewOutlineRect(const LayoutRect&);
981
982 LayoutRect oldOutlineRect();
983 void setOldOutlineRect(const LayoutRect&);
984
979 bool shouldDoFullRepaintAfterLayout() const { return m_bitfields.shouldDoFul lRepaintAfterLayout(); } 985 bool shouldDoFullRepaintAfterLayout() const { return m_bitfields.shouldDoFul lRepaintAfterLayout(); }
980 void setShouldDoFullRepaintAfterLayout(bool b) { m_bitfields.setShouldDoFull RepaintAfterLayout(b); } 986 void setShouldDoFullRepaintAfterLayout(bool b) { m_bitfields.setShouldDoFull RepaintAfterLayout(b); }
987
988 bool shouldDoFullRepaintIfSelfPaintingLayer() const { return m_bitfields.sho uldDoFullRepaintIfSelfPaintingLayer(); }
989 void setShouldDoFullRepaintIfSelfPaintingLayer(bool b) { m_bitfields.setShou ldDoFullRepaintIfSelfPaintingLayer(b); }
990
991 bool shouldDoFullRepaintIfNotComposited() const { return m_bitfields.shouldD oFullRepaintIfNotComposited(); }
992 void setShouldDoFullRepaintIfNotComposited(bool b) { m_bitfields.setShouldDo FullRepaintIfNotComposited(b); }
993
981 bool shouldRepaintOverflowIfNeeded() const { return m_bitfields.shouldRepain tOverflowIfNeeded(); } 994 bool shouldRepaintOverflowIfNeeded() const { return m_bitfields.shouldRepain tOverflowIfNeeded(); }
982 995
983 void clearRepaintRects() 996 void clearRepaintState();
984 {
985 setNewRepaintRect(LayoutRect());
986 setOldRepaintRect(LayoutRect());
987
988 setShouldDoFullRepaintAfterLayout(false);
989 setShouldRepaintOverflowIfNeeded(false);
990 setLayoutDidGetCalled(false);
991 }
992 997
993 // layoutDidGetCalled indicates whether this render object was re-laid-out 998 // layoutDidGetCalled indicates whether this render object was re-laid-out
994 // since the last call to setLayoutDidGetCalled(false) on this object. 999 // since the last call to setLayoutDidGetCalled(false) on this object.
995 bool layoutDidGetCalled() { return m_bitfields.layoutDidGetCalled(); } 1000 bool layoutDidGetCalled() { return m_bitfields.layoutDidGetCalled(); }
996 void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); } 1001 void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); }
997 1002
998 bool shouldDisableLayoutState() const { return hasColumns() || hasTransform( ) || hasReflection() || style()->isFlippedBlocksWritingMode(); } 1003 bool shouldDisableLayoutState() const { return hasColumns() || hasTransform( ) || hasReflection() || style()->isFlippedBlocksWritingMode(); }
999 1004
1000 protected: 1005 protected:
1001 inline bool layerCreationAllowedForSubtree() const; 1006 inline bool layerCreationAllowedForSubtree() const;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 }; 1104 };
1100 1105
1101 public: 1106 public:
1102 RenderObjectBitfields(Node* node) 1107 RenderObjectBitfields(Node* node)
1103 : m_selfNeedsLayout(false) 1108 : m_selfNeedsLayout(false)
1104 // FIXME: shouldDoFullRepaintAfterLayout is needed because we reset 1109 // FIXME: shouldDoFullRepaintAfterLayout is needed because we reset
1105 // the layout bits before repaint when doing repaintAfterLayout. 1110 // the layout bits before repaint when doing repaintAfterLayout.
1106 // Holding the layout bits until after repaint would remove the need 1111 // Holding the layout bits until after repaint would remove the need
1107 // for this flag. 1112 // for this flag.
1108 , m_shouldDoFullRepaintAfterLayout(false) 1113 , m_shouldDoFullRepaintAfterLayout(false)
1114 , m_shouldDoFullRepaintIfSelfPaintingLayer(false)
1115 , m_shouldDoFullRepaintIfNotComposited(false)
Julien - ping for review 2014/03/07 18:26:38 The second boolean is not needed if we clear the n
dsinclair 2014/03/07 19:29:48 I'm not sure if m_shouldDoFullRepaintIfNotComposi
Julien - ping for review 2014/03/13 22:26:50 I wasn't too stressed out about this one. It would
1109 , m_shouldRepaintOverflowIfNeeded(false) 1116 , m_shouldRepaintOverflowIfNeeded(false)
1110 , m_needsPositionedMovementLayout(false) 1117 , m_needsPositionedMovementLayout(false)
1111 , m_normalChildNeedsLayout(false) 1118 , m_normalChildNeedsLayout(false)
1112 , m_posChildNeedsLayout(false) 1119 , m_posChildNeedsLayout(false)
1113 , m_needsSimplifiedNormalFlowLayout(false) 1120 , m_needsSimplifiedNormalFlowLayout(false)
1114 , m_preferredLogicalWidthsDirty(false) 1121 , m_preferredLogicalWidthsDirty(false)
1115 , m_floating(false) 1122 , m_floating(false)
1116 , m_isAnonymous(!node) 1123 , m_isAnonymous(!node)
1117 , m_isText(false) 1124 , m_isText(false)
1118 , m_isBox(false) 1125 , m_isBox(false)
(...skipping 12 matching lines...) Expand all
1131 , m_hasColumns(false) 1138 , m_hasColumns(false)
1132 , m_layoutDidGetCalled(false) 1139 , m_layoutDidGetCalled(false)
1133 , m_positionedState(IsStaticallyPositioned) 1140 , m_positionedState(IsStaticallyPositioned)
1134 , m_selectionState(SelectionNone) 1141 , m_selectionState(SelectionNone)
1135 , m_flowThreadState(NotInsideFlowThread) 1142 , m_flowThreadState(NotInsideFlowThread)
1136 , m_boxDecorationState(NoBoxDecorations) 1143 , m_boxDecorationState(NoBoxDecorations)
1137 , m_hasPendingResourceUpdate(false) 1144 , m_hasPendingResourceUpdate(false)
1138 { 1145 {
1139 } 1146 }
1140 1147
1141 // 32 bits have been used in the first word, and 3 in the second. 1148 // 32 bits have been used in the first word, and 5 in the second.
1142 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 1149 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
1143 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaint AfterLayout); 1150 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintAfterLayout, ShouldDoFullRepaint AfterLayout);
1151 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintIfSelfPaintingLayer, ShouldDoFul lRepaintIfSelfPaintingLayer);
1152 ADD_BOOLEAN_BITFIELD(shouldDoFullRepaintIfNotComposited, ShouldDoFullRep aintIfNotComposited);
1144 ADD_BOOLEAN_BITFIELD(shouldRepaintOverflowIfNeeded, ShouldRepaintOverflo wIfNeeded); 1153 ADD_BOOLEAN_BITFIELD(shouldRepaintOverflowIfNeeded, ShouldRepaintOverflo wIfNeeded);
1145 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout); 1154 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout);
1146 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); 1155 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout);
1147 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); 1156 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout);
1148 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout); 1157 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout);
1149 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty); 1158 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty);
1150 ADD_BOOLEAN_BITFIELD(floating, Floating); 1159 ADD_BOOLEAN_BITFIELD(floating, Floating);
1151 1160
1152 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); 1161 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous);
1153 ADD_BOOLEAN_BITFIELD(isText, IsText); 1162 ADD_BOOLEAN_BITFIELD(isText, IsText);
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 void showTree(const WebCore::RenderObject*); 1435 void showTree(const WebCore::RenderObject*);
1427 void showLineTree(const WebCore::RenderObject*); 1436 void showLineTree(const WebCore::RenderObject*);
1428 void showRenderTree(const WebCore::RenderObject* object1); 1437 void showRenderTree(const WebCore::RenderObject* object1);
1429 // We don't make object2 an optional parameter so that showRenderTree 1438 // We don't make object2 an optional parameter so that showRenderTree
1430 // can be called from gdb easily. 1439 // can be called from gdb easily.
1431 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); 1440 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2);
1432 1441
1433 #endif 1442 #endif
1434 1443
1435 #endif // RenderObject_h 1444 #endif // RenderObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698