From bfcd88899348e8d71fa8b62811359d7cf8c759d9 Mon Sep 17 00:00:00 2001 From: "jamescook@chromium.org" Date: Wed, 24 Apr 2013 17:45:12 +0000 Subject: views: Add class names to views paint trace events We're trying to track down a view that is painting at 60 Hz, but the problem only reproduces in official canary builds. The class names may help us find the view in question. BUG=227375 TEST=manual, run about:tracing, capture a trace, click on a View::Paint task and note that there is a "class" data field Review URL: https://chromiumcodereview.appspot.com/14149012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196176 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/views/view.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/views/view.cc') diff --git a/ui/views/view.cc b/ui/views/view.cc index 179c9de..6540297 100644 --- a/ui/views/view.cc +++ b/ui/views/view.cc @@ -775,7 +775,7 @@ void View::SchedulePaintInRect(const gfx::Rect& rect) { } void View::Paint(gfx::Canvas* canvas) { - TRACE_EVENT0("views", "View::Paint"); + TRACE_EVENT1("views", "View::Paint", "class", GetClassName()); ScopedCanvas scoped_canvas(canvas); @@ -1276,14 +1276,14 @@ void View::NativeViewHierarchyChanged(bool attached, // Painting -------------------------------------------------------------------- void View::PaintChildren(gfx::Canvas* canvas) { - TRACE_EVENT0("views", "View::PaintChildren"); + TRACE_EVENT1("views", "View::PaintChildren", "class", GetClassName()); for (int i = 0, count = child_count(); i < count; ++i) if (!child_at(i)->layer()) child_at(i)->Paint(canvas); } void View::OnPaint(gfx::Canvas* canvas) { - TRACE_EVENT0("views", "View::OnPaint"); + TRACE_EVENT1("views", "View::OnPaint", "class", GetClassName()); OnPaintBackground(canvas); OnPaintFocusBorder(canvas); OnPaintBorder(canvas); -- cgit v1.1