Chromium Code Reviews| Index: Source/platform/graphics/ContentLayerDelegate.cpp |
| diff --git a/Source/platform/graphics/ContentLayerDelegate.cpp b/Source/platform/graphics/ContentLayerDelegate.cpp |
| index d817f1fcc0709207a2f379dfdccbc64f5ad13ccc..11645f6453c4d82fe74b748430d9fd2325dce1bd 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(); |
| + tracedValue->pushInteger(clip.x); |
| + tracedValue->pushInteger(clip.y); |
| + tracedValue->pushInteger(clip.x + clip.width); |
| + tracedValue->pushInteger(clip.y + clip.height); |
|
Xianzhu
2015/06/23 22:58:54
The third and fourth values of rect might be ambig
chrishtr
2015/06/23 23:05:38
Done.
|
| + 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(); |