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

Unified Diff: Source/core/paint/LayoutObjectDrawingRecorder.h

Issue 1294233004: Subtree caching implementation in blink-core (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: s/setSelfNeedsRepaint/setNeedsRepaint/ Created 5 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 side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698