Index: Source/core/paint/LayoutObjectDrawingRecorder.h |
diff --git a/Source/core/paint/LayoutObjectDrawingRecorder.h b/Source/core/paint/LayoutObjectDrawingRecorder.h |
index cd79523f73d4eafbec90f131847e5889286f5cae..cdc59d7e685b9c7ebe83158737f5b57754a17fa6 100644 |
--- a/Source/core/paint/LayoutObjectDrawingRecorder.h |
+++ b/Source/core/paint/LayoutObjectDrawingRecorder.h |
@@ -23,7 +23,12 @@ public: |
{ |
if (layoutObject.fullPaintInvalidationReason() == PaintInvalidationDelayedFull) |
return false; |
- return DrawingRecorder::useCachedDrawingIfPossible(context, layoutObject, displayItemType); |
+ // TODO(wangxianzhu): Use LayoutObject repaint flags when possible to avoid hash lookups in DisplayItemList. |
+ if (DrawingRecorder::useCachedDrawingIfPossible(context, layoutObject, displayItemType)) { |
+ ASSERT(!layoutObject.selfNeedsRepaint()); |
+ return true; |
+ } |
+ return false; |
} |
static bool useCachedDrawingIfPossible(GraphicsContext& context, const LayoutObject& layoutObject, PaintPhase phase) |