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

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 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space 1107 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space
1108 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same 1108 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same
1109 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing. 1109 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing.
1110 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida tionContainer, const LayoutRect&, PaintInvalidationReason) const; 1110 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida tionContainer, const LayoutRect&, PaintInvalidationReason) const;
1111 1111
1112 // Invalidate the paint of a specific subrectangle within a given object. Th e rect is in the object's coordinate space. 1112 // Invalidate the paint of a specific subrectangle within a given object. Th e rect is in the object's coordinate space.
1113 void invalidatePaintRectangle(const LayoutRect&) const; 1113 void invalidatePaintRectangle(const LayoutRect&) const;
1114 void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutR ect&) const; 1114 void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutR ect&) const;
1115 1115
1116 // 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. 1116 // 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.
1117 virtual void invalidateTreeIfNeeded(PaintInvalidationState&); 1117 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&);
1118 1118
1119 // This function only invalidates the visual overflow. 1119 // This function only invalidates the visual overflow.
1120 // 1120 //
1121 // Note that overflow is a box concept but this function 1121 // Note that overflow is a box concept but this function
1122 // is only supported for block-flow. 1122 // is only supported for block-flow.
1123 virtual void invalidatePaintForOverflow(); 1123 virtual void invalidatePaintForOverflow();
1124 void invalidatePaintForOverflowIfNeeded(); 1124 void invalidatePaintForOverflowIfNeeded();
1125 1125
1126 void invalidatePaintIncludingNonCompositingDescendants(); 1126 void invalidatePaintIncludingNonCompositingDescendants();
1127 void invalidatePaintIncludingNonSelfPaintingLayerDescendants(const LayoutBox ModelObject& paintInvalidationContainer); 1127 void invalidatePaintIncludingNonSelfPaintingLayerDescendants(const LayoutBox ModelObject& paintInvalidationContainer);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 m_previousPositionFromPaintInvalidationBacking = paintOffset; 1322 m_previousPositionFromPaintInvalidationBacking = paintOffset;
1323 } 1323 }
1324 1324
1325 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi elds.fullPaintInvalidationReason(); } 1325 PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfi elds.fullPaintInvalidationReason(); }
1326 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv alidationReason() != PaintInvalidationNone; } 1326 bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInv alidationReason() != PaintInvalidationNone; }
1327 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid ationFull); 1327 void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalid ationFull);
1328 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida tionReason(PaintInvalidationNone); } 1328 void clearShouldDoFullPaintInvalidation() { m_bitfields.setFullPaintInvalida tionReason(PaintInvalidationNone); }
1329 1329
1330 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); } 1330 bool shouldInvalidateOverflowForPaint() const { return m_bitfields.shouldInv alidateOverflowForPaint(); }
1331 1331
1332 virtual void clearPaintInvalidationState(const PaintInvalidationState&); 1332 virtual void clearPaintInvalidationFlags(const PaintInvalidationState&);
1333 1333
1334 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); } 1334 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); }
1335 void setMayNeedPaintInvalidation(); 1335 void setMayNeedPaintInvalidation();
1336 1336
1337 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate Selection(); } 1337 bool shouldInvalidateSelection() const { return m_bitfields.shouldInvalidate Selection(); }
1338 void setShouldInvalidateSelection(); 1338 void setShouldInvalidateSelection();
1339 1339
1340 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const 1340 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva lidationState) const
1341 { 1341 {
1342 // Should check for paint invalidation if some ancestor changed location , because this object 1342 // 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
1523 1523
1524 // This function walks the descendants of |this|, following a 1524 // This function walks the descendants of |this|, following a
1525 // layout ordering. 1525 // layout ordering.
1526 // 1526 //
1527 // The ordering is important for PaintInvalidationState, as 1527 // The ordering is important for PaintInvalidationState, as
1528 // it requires to be called following a descendant/container 1528 // it requires to be called following a descendant/container
1529 // relationship. 1529 // relationship.
1530 // 1530 //
1531 // The function is overridden to handle special children 1531 // The function is overridden to handle special children
1532 // (e.g. percentage height descendants or reflections). 1532 // (e.g. percentage height descendants or reflections).
1533 virtual void invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& child PaintInvalidationState); 1533 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState);
1534 1534
1535 // This function generates the invalidation for this object only. 1535 // This function generates the invalidation for this object only.
1536 // It doesn't recurse into other object, as this is handled 1536 // It doesn't recurse into other object, as this is handled
1537 // by invalidatePaintOfSubtreesIfNeeded. 1537 // by invalidatePaintOfSubtreesIfNeeded.
1538 virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationSta te&, const LayoutBoxModelObject& paintInvalidationContainer); 1538 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat ionState&);
1539 1539
1540 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients 1540 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients
1541 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc., 1541 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc.,
1542 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and 1542 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and
1543 // parts which are invalidated separately (e.g. scrollbars). 1543 // parts which are invalidated separately (e.g. scrollbars).
1544 // The caller should ensure the enclosing layer has been setNeedsRepaint bef ore calling this function. 1544 // The caller should ensure the enclosing layer has been setNeedsRepaint bef ore calling this function.
1545 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer, PaintInvalidationReason) const; 1545 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer, PaintInvalidationReason) const;
1546 1546
1547 // Sets enclosing layer needsRepaint, then calls invalidateDisplayItemClient s(). 1547 // Sets enclosing layer needsRepaint, then calls invalidateDisplayItemClient s().
1548 // Should use this version when PaintInvalidationState is available. 1548 // Should use this version when PaintInvalidationState is available.
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2155 void showTree(const blink::LayoutObject*); 2155 void showTree(const blink::LayoutObject*);
2156 void showLineTree(const blink::LayoutObject*); 2156 void showLineTree(const blink::LayoutObject*);
2157 void showLayoutTree(const blink::LayoutObject* object1); 2157 void showLayoutTree(const blink::LayoutObject* object1);
2158 // We don't make object2 an optional parameter so that showLayoutTree 2158 // We don't make object2 an optional parameter so that showLayoutTree
2159 // can be called from gdb easily. 2159 // can be called from gdb easily.
2160 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2160 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2161 2161
2162 #endif 2162 #endif
2163 2163
2164 #endif // LayoutObject_h 2164 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698