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

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 561443002: Ouptut oldLocation and newLocation in trace of paint invalidation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 2cea782a9b30defcba4131c2e25ffe0314ec35e3..c8146a43934775d64f3013aed35f554e35098c10 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -1465,6 +1465,15 @@ void addJsonObjectForRect(TracedValue* value, const char* name, const T& rect)
value->endDictionary();
}
+template <typename T>
+void addJsonObjectForPoint(TracedValue* value, const char* name, const T& point)
+{
+ value->beginDictionary(name);
+ value->setDouble("x", point.x());
+ value->setDouble("y", point.y());
+ value->endDictionary();
+}
+
static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForPaintInvalidationInfo(const LayoutRect& rect, const String& invalidationReason)
{
RefPtr<TracedValue> value = TracedValue::create();
@@ -1611,11 +1620,13 @@ void RenderObject::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationStat
}
}
-static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRects(const LayoutRect& oldRect, const LayoutRect& newRect)
+static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRects(const LayoutRect& oldRect, const LayoutPoint& oldLocation, const LayoutRect& newRect, const LayoutPoint& newLocation)
{
RefPtr<TracedValue> value = TracedValue::create();
- addJsonObjectForRect(value.get(), "old", oldRect);
- addJsonObjectForRect(value.get(), "new", newRect);
+ addJsonObjectForRect(value.get(), "oldRect", oldRect);
+ addJsonObjectForPoint(value.get(), "oldLocation", oldLocation);
+ addJsonObjectForRect(value.get(), "newRect", newRect);
+ addJsonObjectForPoint(value.get(), "newLocation", newLocation);
return value;
}
@@ -1640,7 +1651,7 @@ InvalidationReason RenderObject::invalidatePaintIfNeeded(const PaintInvalidation
TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "RenderObject::invalidatePaintIfNeeded()",
"object", this->debugName().ascii(),
- "info", jsonObjectForOldAndNewRects(oldBounds, newBounds));
+ "info", jsonObjectForOldAndNewRects(oldBounds, oldLocation, newBounds, newLocation));
InvalidationReason invalidationReason = getPaintInvalidationReason(paintInvalidationContainer, oldBounds, oldLocation, newBounds, newLocation);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698