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

Unified Diff: Source/platform/graphics/ContentLayerDelegate.cpp

Issue 1205703003: Add tracing for ContentLayerDelegate paintContents and DisplayItemList commit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ContentLayerDelegate.cpp
diff --git a/Source/platform/graphics/ContentLayerDelegate.cpp b/Source/platform/graphics/ContentLayerDelegate.cpp
index d817f1fcc0709207a2f379dfdccbc64f5ad13ccc..e12f80fe9cf16085325ad3770f42bd3cd1200214 100644
--- a/Source/platform/graphics/ContentLayerDelegate.cpp
+++ b/Source/platform/graphics/ContentLayerDelegate.cpp
@@ -28,6 +28,8 @@
#include "platform/EventTracer.h"
#include "platform/RuntimeEnabledFeatures.h"
+#include "platform/TraceEvent.h"
+#include "platform/TracedValue.h"
#include "platform/geometry/IntRect.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/paint/DisplayItemList.h"
@@ -51,10 +53,24 @@ ContentLayerDelegate::~ContentLayerDelegate()
{
}
+PassRefPtr<TracedValue> toTracedValue(const WebRect& clip)
+{
+ RefPtr<TracedValue> tracedValue = TracedValue::create();
+ tracedValue->beginArray("clip_rect");
+ tracedValue->pushInteger(clip.x);
+ tracedValue->pushInteger(clip.y);
+ tracedValue->pushInteger(clip.width);
+ tracedValue->pushInteger(clip.height);
+ tracedValue->endArray();
+ return tracedValue;
+}
+
void ContentLayerDelegate::paintContents(
SkCanvas* canvas, const WebRect& clip,
WebContentLayerClient::PaintingControlSetting paintingControl)
{
+ TRACE_EVENT1("blink,benchmark", "ContentLayerDelegate::paintContents", "clip_rect", toTracedValue(clip));
+
ASSERT(!RuntimeEnabledFeatures::slimmingPaintEnabled());
GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisabled;
@@ -70,6 +86,8 @@ void ContentLayerDelegate::paintContents(
WebDisplayItemList* webDisplayItemList, const WebRect& clip,
WebContentLayerClient::PaintingControlSetting paintingControl)
{
+ TRACE_EVENT1("blink,benchmark", "ContentLayerDelegate::paintContents", "clip_rect", toTracedValue(clip));
+
ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
DisplayItemList* displayItemList = m_painter->displayItemList();
« no previous file with comments | « no previous file | Source/platform/graphics/paint/DisplayItemList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698