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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.h

Issue 2392443009: reflow comments in core/paint (Closed)
Patch Set: Created 4 years, 2 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
Index: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.h
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.h b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.h
index f1d9989341f47df1e34eb92dc0170e89601eaa0d..fcd5b5e43f85b44a6a55744c3c63063b63a998d1 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.h
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.h
@@ -27,10 +27,12 @@ class CORE_EXPORT ObjectPaintInvalidator {
static void objectWillBeDestroyed(const LayoutObject&);
// This calls paintingLayer() which walks up the tree.
- // If possible, use the faster PaintInvalidatorContext.paintingLayer.setNeedsRepaint().
+ // If possible, use the faster
+ // PaintInvalidatorContext.paintingLayer.setNeedsRepaint().
void slowSetPaintingLayerNeedsRepaint();
- // TODO(wangxianzhu): Change the call sites to use the faster version if possible.
+ // TODO(wangxianzhu): Change the call sites to use the faster version if
+ // possible.
void slowSetPaintingLayerNeedsRepaintAndInvalidateDisplayItemClient(
const DisplayItemClient& client,
PaintInvalidationReason reason) {
@@ -45,21 +47,26 @@ class CORE_EXPORT ObjectPaintInvalidator {
const LayoutBoxModelObject& paintInvalidationContainer,
PaintInvalidationReason);
- // The caller should ensure the painting layer has been setNeedsRepaint before calling this function.
+ // The caller should ensure the painting layer has been setNeedsRepaint before
+ // calling this function.
void invalidateDisplayItemClient(const DisplayItemClient&,
PaintInvalidationReason);
- // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space
- // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that this coordinaten space is not the same
- // as the local coordinate space of |paintInvalidationContainer| in the presence of layer squashing.
+ // Actually do the paint invalidate of rect r for this object which has been
+ // computed in the coordinate space of the GraphicsLayer backing of
+ // |paintInvalidationContainer|. Note that this coordinaten space is not the
+ // same as the local coordinate space of |paintInvalidationContainer| in the
+ // presence of layer squashing.
void invalidatePaintUsingContainer(
const LayoutBoxModelObject& paintInvalidationContainer,
const LayoutRect&,
PaintInvalidationReason);
- // Invalidate the paint of a specific subrectangle within a given object. The rect is in the object's coordinate space.
- // If a DisplayItemClient is specified, that client is invalidated rather than |m_object|.
- // Returns the visual rect that was invalidated (i.e, invalidation in the space of the GraphicsLayer backing this LayoutObject).
+ // Invalidate the paint of a specific subrectangle within a given object. The
+ // rect is in the object's coordinate space. If a DisplayItemClient is
+ // specified, that client is invalidated rather than |m_object|.
+ // Returns the visual rect that was invalidated (i.e, invalidation in the
+ // space of the GraphicsLayer backing this LayoutObject).
LayoutRect invalidatePaintRectangle(const LayoutRect&, DisplayItemClient*);
void invalidatePaintIncludingNonCompositingDescendants();
@@ -93,19 +100,23 @@ class ObjectPaintInvalidatorWithContext : public ObjectPaintInvalidator {
PaintInvalidationReason invalidatePaintIfNeededWithComputedReason(
PaintInvalidationReason);
- // This function tries to minimize the amount of invalidation generated by invalidating the "difference" between
- // |m_context.oldBounds| and |m_context.newBounds|. This means invalidating the union of the previous rectangles
- // but not their intersection. The use case is when an element only requires a paint invalidation (which means
- // that its content didn't change) and its bounds changed but its location didn't.
- // If we don't meet the criteria for an incremental paint, the alternative is a full paint invalidation.
- // Returns true if any paint invalidation is done.
+ // This function tries to minimize the amount of invalidation generated by
+ // invalidating the "difference" between |m_context.oldBounds| and
+ // |m_context.newBounds|. This means invalidating the union of the previous
+ // rectangles but not their intersection. The use case is when an element only
+ // requires a paint invalidation (which means that its content didn't change)
+ // and its bounds changed but its location didn't. If we don't meet the
+ // criteria for an incremental paint, the alternative is a full paint
+ // invalidation. Returns true if any paint invalidation is done.
bool incrementallyInvalidatePaint();
private:
void invalidateSelectionIfNeeded(PaintInvalidationReason);
- // This function generates a full invalidation, which means invalidating both |oldBounds| and |newBounds|.
- // This is the default choice when generating an invalidation, as it is always correct, albeit it may force some extra painting.
+ // This function generates a full invalidation, which means invalidating both
+ // |oldBounds| and |newBounds|. This is the default choice when generating an
+ // invalidation, as it is always correct, albeit it may force some extra
+ // painting.
void fullyInvalidatePaint(PaintInvalidationReason,
const LayoutRect& oldBounds,
const LayoutRect& newBounds);
@@ -113,7 +124,8 @@ class ObjectPaintInvalidatorWithContext : public ObjectPaintInvalidator {
const PaintInvalidatorContext& m_context;
};
-// TODO(crbug.com/457415): We should not allow paint invalidation out of paint invalidation state.
+// TODO(crbug.com/457415): We should not allow paint invalidation out of paint
+// invalidation state.
class DisablePaintInvalidationStateAsserts {
STACK_ALLOCATED();
WTF_MAKE_NONCOPYABLE(DisablePaintInvalidationStateAsserts);

Powered by Google App Engine
This is Rietveld 408576698