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

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

Issue 474793002: Add GraphicsLayerDebugInfo::includesNewPaintInvalidation to distinguish paint from new RenderObjects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 4 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 | Annotate | Revision Log
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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 bool isTablePart() const { return isTableCell() || isRenderTableCol() || isT ableCaption() || isTableRow() || isTableSection(); } 424 bool isTablePart() const { return isTableCell() || isRenderTableCol() || isT ableCaption() || isTableRow() || isTableSection(); }
425 425
426 inline bool isBeforeContent() const; 426 inline bool isBeforeContent() const;
427 inline bool isAfterContent() const; 427 inline bool isAfterContent() const;
428 inline bool isBeforeOrAfterContent() const; 428 inline bool isBeforeOrAfterContent() const;
429 static inline bool isAfterContent(const RenderObject* obj) { return obj && o bj->isAfterContent(); } 429 static inline bool isAfterContent(const RenderObject* obj) { return obj && o bj->isAfterContent(); }
430 430
431 bool hasCounterNodeMap() const { return m_bitfields.hasCounterNodeMap(); } 431 bool hasCounterNodeMap() const { return m_bitfields.hasCounterNodeMap(); }
432 void setHasCounterNodeMap(bool hasCounterNodeMap) { m_bitfields.setHasCounte rNodeMap(hasCounterNodeMap); } 432 void setHasCounterNodeMap(bool hasCounterNodeMap) { m_bitfields.setHasCounte rNodeMap(hasCounterNodeMap); }
433 bool everHadLayout() const { return m_bitfields.everHadLayout(); } 433 bool everHadLayout() const { return m_bitfields.everHadLayout(); }
434 bool hadPaintInvalidation() const { return m_bitfields.hadPaintInvalidation( ); }
434 435
435 bool childrenInline() const { return m_bitfields.childrenInline(); } 436 bool childrenInline() const { return m_bitfields.childrenInline(); }
436 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); } 437 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); }
437 bool hasColumns() const { return m_bitfields.hasColumns(); } 438 bool hasColumns() const { return m_bitfields.hasColumns(); }
438 void setHasColumns(bool b = true) { m_bitfields.setHasColumns(b); } 439 void setHasColumns(bool b = true) { m_bitfields.setHasColumns(b); }
439 440
440 bool alwaysCreateLineBoxesForRenderInline() const 441 bool alwaysCreateLineBoxesForRenderInline() const
441 { 442 {
442 ASSERT(isRenderInline()); 443 ASSERT(isRenderInline());
443 return m_bitfields.alwaysCreateLineBoxesForRenderInline(); 444 return m_bitfields.alwaysCreateLineBoxesForRenderInline();
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 LayoutRect computePaintInvalidationRect(const RenderLayerModelObject* paintI nvalidationContainer, const PaintInvalidationState* = 0) const; 866 LayoutRect computePaintInvalidationRect(const RenderLayerModelObject* paintI nvalidationContainer, const PaintInvalidationState* = 0) const;
866 867
867 // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the rendering backing of |paintInvalidationContainer| 868 // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the rendering backing of |paintInvalidationContainer|
868 LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* pain tInvalidationContainer, const PaintInvalidationState* = 0) const; 869 LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* pain tInvalidationContainer, const PaintInvalidationState* = 0) const;
869 870
870 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space 871 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space
871 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same 872 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same
872 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing. 873 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing.
873 // If |paintInvalidationContainer| is 0, invalidate paints via the view. 874 // If |paintInvalidationContainer| is 0, invalidate paints via the view.
874 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636 99. 875 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636 99.
875 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali dationContainer, const LayoutRect&, InvalidationReason) const; 876 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali dationContainer, const LayoutRect&, InvalidationReason);
876 877
877 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space. 878 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space.
878 void invalidatePaintRectangle(const LayoutRect&) const; 879 void invalidatePaintRectangle(const LayoutRect&);
879 880
880 InvalidationReason invalidatePaintIfNeeded(const RenderLayerModelObject& pai ntInvalidationContainer, 881 InvalidationReason invalidatePaintIfNeeded(const RenderLayerModelObject& pai ntInvalidationContainer,
881 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer, const PaintInvalidationState&); 882 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer, const PaintInvalidationState&);
882 883
883 // Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint in validation state. 884 // Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint in validation state.
884 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); 885 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&);
885 886
886 virtual void invalidatePaintForOverflow(); 887 virtual void invalidatePaintForOverflow();
887 void invalidatePaintForOverflowIfNeeded(); 888 void invalidatePaintForOverflowIfNeeded();
888 889
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 virtual bool paintInvalidationStateIsDirty() const 1151 virtual bool paintInvalidationStateIsDirty() const
1151 { 1152 {
1152 return layoutDidGetCalled() || shouldDoFullPaintInvalidation() || should DoFullPaintInvalidationIfSelfPaintingLayer() 1153 return layoutDidGetCalled() || shouldDoFullPaintInvalidation() || should DoFullPaintInvalidationIfSelfPaintingLayer()
1153 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil dren() || mayNeedPaintInvalidation(); 1154 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil dren() || mayNeedPaintInvalidation();
1154 } 1155 }
1155 #endif 1156 #endif
1156 1157
1157 private: 1158 private:
1158 // Invalidate the paint of the entire object. This is only used when a rende rer is to be removed. 1159 // Invalidate the paint of the entire object. This is only used when a rende rer is to be removed.
1159 // For other cases, the caller should call setShouldDoFullPaintInvalidation( ) instead. 1160 // For other cases, the caller should call setShouldDoFullPaintInvalidation( ) instead.
1160 void invalidatePaintForWholeRenderer() const; 1161 void invalidatePaintForWholeRenderer();
1161 1162
1162 const RenderLayerModelObject* enclosingCompositedContainer() const; 1163 const RenderLayerModelObject* enclosingCompositedContainer() const;
1163 1164
1164 RenderFlowThread* locateFlowThreadContainingBlock() const; 1165 RenderFlowThread* locateFlowThreadContainingBlock() const;
1165 void removeFromRenderFlowThread(); 1166 void removeFromRenderFlowThread();
1166 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); 1167 void removeFromRenderFlowThreadRecursive(RenderFlowThread*);
1167 1168
1168 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; 1169 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const;
1169 1170
1170 RenderStyle* cachedFirstLineStyle() const; 1171 RenderStyle* cachedFirstLineStyle() const;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 , m_isInline(true) 1245 , m_isInline(true)
1245 , m_isReplaced(false) 1246 , m_isReplaced(false)
1246 , m_horizontalWritingMode(true) 1247 , m_horizontalWritingMode(true)
1247 , m_isDragging(false) 1248 , m_isDragging(false)
1248 , m_hasLayer(false) 1249 , m_hasLayer(false)
1249 , m_hasOverflowClip(false) 1250 , m_hasOverflowClip(false)
1250 , m_hasTransform(false) 1251 , m_hasTransform(false)
1251 , m_hasReflection(false) 1252 , m_hasReflection(false)
1252 , m_hasCounterNodeMap(false) 1253 , m_hasCounterNodeMap(false)
1253 , m_everHadLayout(false) 1254 , m_everHadLayout(false)
1255 , m_hadPaintInvalidation(false)
1254 , m_ancestorLineBoxDirty(false) 1256 , m_ancestorLineBoxDirty(false)
1255 , m_layoutDidGetCalled(false) 1257 , m_layoutDidGetCalled(false)
1256 , m_hasPendingResourceUpdate(false) 1258 , m_hasPendingResourceUpdate(false)
1257 , m_childrenInline(false) 1259 , m_childrenInline(false)
1258 , m_hasColumns(false) 1260 , m_hasColumns(false)
1259 , m_alwaysCreateLineBoxesForRenderInline(false) 1261 , m_alwaysCreateLineBoxesForRenderInline(false)
1260 , m_positionedState(IsStaticallyPositioned) 1262 , m_positionedState(IsStaticallyPositioned)
1261 , m_selectionState(SelectionNone) 1263 , m_selectionState(SelectionNone)
1262 , m_flowThreadState(NotInsideFlowThread) 1264 , m_flowThreadState(NotInsideFlowThread)
1263 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 1265 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
(...skipping 25 matching lines...) Expand all
1289 ADD_BOOLEAN_BITFIELD(horizontalWritingMode, HorizontalWritingMode); 1291 ADD_BOOLEAN_BITFIELD(horizontalWritingMode, HorizontalWritingMode);
1290 ADD_BOOLEAN_BITFIELD(isDragging, IsDragging); 1292 ADD_BOOLEAN_BITFIELD(isDragging, IsDragging);
1291 1293
1292 ADD_BOOLEAN_BITFIELD(hasLayer, HasLayer); 1294 ADD_BOOLEAN_BITFIELD(hasLayer, HasLayer);
1293 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca se of overflow:auto/scroll/hidden 1295 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca se of overflow:auto/scroll/hidden
1294 ADD_BOOLEAN_BITFIELD(hasTransform, HasTransform); 1296 ADD_BOOLEAN_BITFIELD(hasTransform, HasTransform);
1295 ADD_BOOLEAN_BITFIELD(hasReflection, HasReflection); 1297 ADD_BOOLEAN_BITFIELD(hasReflection, HasReflection);
1296 1298
1297 ADD_BOOLEAN_BITFIELD(hasCounterNodeMap, HasCounterNodeMap); 1299 ADD_BOOLEAN_BITFIELD(hasCounterNodeMap, HasCounterNodeMap);
1298 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout); 1300 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout);
1301 ADD_BOOLEAN_BITFIELD(hadPaintInvalidation, HadPaintInvalidation);
1299 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty); 1302 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty);
1300 1303
1301 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled); 1304 ADD_BOOLEAN_BITFIELD(layoutDidGetCalled, LayoutDidGetCalled);
1302 1305
1303 ADD_BOOLEAN_BITFIELD(hasPendingResourceUpdate, HasPendingResourceUpdate) ; 1306 ADD_BOOLEAN_BITFIELD(hasPendingResourceUpdate, HasPendingResourceUpdate) ;
1304 1307
1305 // from RenderBlock 1308 // from RenderBlock
1306 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); 1309 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline);
1307 ADD_BOOLEAN_BITFIELD(hasColumns, HasColumns); 1310 ADD_BOOLEAN_BITFIELD(hasColumns, HasColumns);
1308 1311
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 1344
1342 RenderObjectBitfields m_bitfields; 1345 RenderObjectBitfields m_bitfields;
1343 1346
1344 void setSelfNeedsLayout(bool b) { m_bitfields.setSelfNeedsLayout(b); } 1347 void setSelfNeedsLayout(bool b) { m_bitfields.setSelfNeedsLayout(b); }
1345 void setNeedsPositionedMovementLayout(bool b) { m_bitfields.setNeedsPosition edMovementLayout(b); } 1348 void setNeedsPositionedMovementLayout(bool b) { m_bitfields.setNeedsPosition edMovementLayout(b); }
1346 void setNormalChildNeedsLayout(bool b) { m_bitfields.setNormalChildNeedsLayo ut(b); } 1349 void setNormalChildNeedsLayout(bool b) { m_bitfields.setNormalChildNeedsLayo ut(b); }
1347 void setPosChildNeedsLayout(bool b) { m_bitfields.setPosChildNeedsLayout(b); } 1350 void setPosChildNeedsLayout(bool b) { m_bitfields.setPosChildNeedsLayout(b); }
1348 void setNeedsSimplifiedNormalFlowLayout(bool b) { m_bitfields.setNeedsSimpli fiedNormalFlowLayout(b); } 1351 void setNeedsSimplifiedNormalFlowLayout(bool b) { m_bitfields.setNeedsSimpli fiedNormalFlowLayout(b); }
1349 void setIsDragging(bool b) { m_bitfields.setIsDragging(b); } 1352 void setIsDragging(bool b) { m_bitfields.setIsDragging(b); }
1350 void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); } 1353 void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); }
1354 void setHadPaintInvalidation(bool b) { m_bitfields.setHadPaintInvalidation(b ); }
chrishtr 2014/08/25 16:55:05 Remove arg, only true is pased.
kouhei (in TOK) 2014/08/26 14:18:18 Done.
1351 void setShouldInvalidateOverflowForPaint(bool b) { m_bitfields.setShouldInva lidateOverflowForPaint(b); } 1355 void setShouldInvalidateOverflowForPaint(bool b) { m_bitfields.setShouldInva lidateOverflowForPaint(b); }
1352 void setSelfNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setSel fNeedsOverflowRecalcAfterStyleChange(b); } 1356 void setSelfNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setSel fNeedsOverflowRecalcAfterStyleChange(b); }
1353 void setChildNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setCh ildNeedsOverflowRecalcAfterStyleChange(b); } 1357 void setChildNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setCh ildNeedsOverflowRecalcAfterStyleChange(b); }
1354 1358
1355 private: 1359 private:
1356 // Store state between styleWillChange and styleDidChange 1360 // Store state between styleWillChange and styleDidChange
1357 static bool s_affectsParentBlock; 1361 static bool s_affectsParentBlock;
1358 1362
1359 // This stores the paint invalidation rect from the previous layout. 1363 // This stores the paint invalidation rect from the previous layout.
1360 LayoutRect m_previousPaintInvalidationRect; 1364 LayoutRect m_previousPaintInvalidationRect;
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 void showTree(const blink::RenderObject*); 1572 void showTree(const blink::RenderObject*);
1569 void showLineTree(const blink::RenderObject*); 1573 void showLineTree(const blink::RenderObject*);
1570 void showRenderTree(const blink::RenderObject* object1); 1574 void showRenderTree(const blink::RenderObject* object1);
1571 // We don't make object2 an optional parameter so that showRenderTree 1575 // We don't make object2 an optional parameter so that showRenderTree
1572 // can be called from gdb easily. 1576 // can be called from gdb easily.
1573 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1577 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1574 1578
1575 #endif 1579 #endif
1576 1580
1577 #endif // RenderObject_h 1581 #endif // RenderObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698