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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 1804963005: Avoid paintInvalidationContainer parameter of invalidatePaintIfNeeded() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space 1119 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space
1120 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same 1120 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same
1121 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing. 1121 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing.
1122 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida tionContainer, const LayoutRect&, PaintInvalidationReason) const; 1122 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida tionContainer, const LayoutRect&, PaintInvalidationReason) const;
1123 1123
1124 // Invalidate the paint of a specific subrectangle within a given object. Th e rect is in the object's coordinate space. 1124 // Invalidate the paint of a specific subrectangle within a given object. Th e rect is in the object's coordinate space.
1125 void invalidatePaintRectangle(const LayoutRect&) const; 1125 void invalidatePaintRectangle(const LayoutRect&) const;
1126 void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutR ect&) const; 1126 void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutR ect&) const;
1127 1127
1128 // Walk the tree after layout issuing paint invalidations for layoutObjects that have changed or moved, updating bounds that have changed, and clearing pain t invalidation state. 1128 // Walk the tree after layout issuing paint invalidations for layoutObjects that have changed or moved, updating bounds that have changed, and clearing pain t invalidation state.
1129 virtual void invalidateTreeIfNeeded(PaintInvalidationState&); 1129 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&);
1130 1130
1131 // This function only invalidates the visual overflow. 1131 // This function only invalidates the visual overflow.
1132 // 1132 //
1133 // Note that overflow is a box concept but this function 1133 // Note that overflow is a box concept but this function
1134 // is only supported for block-flow. 1134 // is only supported for block-flow.
1135 virtual void invalidatePaintForOverflow(); 1135 virtual void invalidatePaintForOverflow();
1136 void invalidatePaintForOverflowIfNeeded(); 1136 void invalidatePaintForOverflowIfNeeded();
1137 1137
1138 void invalidatePaintIncludingNonCompositingDescendants(); 1138 void invalidatePaintIncludingNonCompositingDescendants();
1139 void invalidatePaintIncludingNonSelfPaintingLayerDescendants(const LayoutBox ModelObject& paintInvalidationContainer); 1139 void invalidatePaintIncludingNonSelfPaintingLayerDescendants(const LayoutBox ModelObject& paintInvalidationContainer);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 m_previousPositionFromPaintInvalidationBacking = paintOffset; 1334 m_previousPositionFromPaintInvalidationBacking = paintOffset;
1335 } 1335 }
1336 1336
1337 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi elds.fullPaintInvalidationReason(); } 1337 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi elds.fullPaintInvalidationReason(); }
1338 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv alidationReason() != PaintInvalidationNone; } 1338 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv alidationReason() != PaintInvalidationNone; }
1339 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid ationFull); 1339 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid ationFull);
1340 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida tionReason(PaintInvalidationNone); } 1340 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida tionReason(PaintInvalidationNone); }
1341 1341
1342 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); } 1342 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); }
1343 1343
1344 virtual void clearPaintInvalidationState(const PaintInvalidationState&); 1344 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&);
1345 1345
1346 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); } 1346 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); }
1347 void setMayNeedPaintInvalidation(); 1347 void setMayNeedPaintInvalidation();
1348 1348
1349 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate Selection(); } 1349 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate Selection(); }
1350 void setShouldInvalidateSelection(); 1350 void setShouldInvalidateSelection();
1351 1351
1352 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const 1352 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const
1353 { 1353 {
1354 // Should check for paint invalidation if some ancestor changed location , because this object 1354 // Should check for paint invalidation if some ancestor changed location , because this object
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 1535
1536 // This function walks the descendants of |this|, following a 1536 // This function walks the descendants of |this|, following a
1537 // layout ordering. 1537 // layout ordering.
1538 // 1538 //
1539 // The ordering is important for PaintInvalidationState, as 1539 // The ordering is important for PaintInvalidationState, as
1540 // it requires to be called following a descendant/container 1540 // it requires to be called following a descendant/container
1541 // relationship. 1541 // relationship.
1542 // 1542 //
1543 // The function is overridden to handle special children 1543 // The function is overridden to handle special children
1544 // (e.g. percentage height descendants or reflections). 1544 // (e.g. percentage height descendants or reflections).
1545 virtual void invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& child PaintInvalidationState); 1545 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState);
1546 1546
1547 // This function generates the invalidation for this object only. 1547 // This function generates the invalidation for this object only.
1548 // It doesn't recurse into other object, as this is handled 1548 // It doesn't recurse into other object, as this is handled
1549 // by invalidatePaintOfSubtreesIfNeeded. 1549 // by invalidatePaintOfSubtreesIfNeeded.
1550 virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationSta te&, const LayoutBoxModelObject& paintInvalidationContainer); 1550 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat ionState&);
1551 1551
1552 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients 1552 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients
1553 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc., 1553 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc.,
1554 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and 1554 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and
1555 // parts which are invalidated separately (e.g. scrollbars). 1555 // parts which are invalidated separately (e.g. scrollbars).
1556 // The caller should ensure the enclosing layer has been setNeedsRepaint bef ore calling this function. 1556 // The caller should ensure the enclosing layer has been setNeedsRepaint bef ore calling this function.
1557 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer, PaintInvalidationReason) const; 1557 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer, PaintInvalidationReason) const;
1558 1558
1559 // Sets enclosing layer needsRepaint, then calls invalidateDisplayItemClient s(). 1559 // Sets enclosing layer needsRepaint, then calls invalidateDisplayItemClient s().
1560 // Should use this version when PaintInvalidationState is available. 1560 // Should use this version when PaintInvalidationState is available.
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 void showTree(const blink::LayoutObject*); 2167 void showTree(const blink::LayoutObject*);
2168 void showLineTree(const blink::LayoutObject*); 2168 void showLineTree(const blink::LayoutObject*);
2169 void showLayoutTree(const blink::LayoutObject* object1); 2169 void showLayoutTree(const blink::LayoutObject* object1);
2170 // We don't make object2 an optional parameter so that showLayoutTree 2170 // We don't make object2 an optional parameter so that showLayoutTree
2171 // can be called from gdb easily. 2171 // can be called from gdb easily.
2172 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2172 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2173 2173
2174 #endif 2174 #endif
2175 2175
2176 #endif // LayoutObject_h 2176 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698