diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 21:39:28 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 21:39:28 +0000 |
commit | b207f31f7c090307173ee38c11621c6b10e3011d (patch) | |
tree | 30edac2d2a9370cd762ee7307ea679808caff8fc /views/view.cc | |
parent | f3ddcadfa8427ee9f8f45f9a7944d0b0a4b14bfd (diff) | |
download | chromium_src-b207f31f7c090307173ee38c11621c6b10e3011d.zip chromium_src-b207f31f7c090307173ee38c11621c6b10e3011d.tar.gz chromium_src-b207f31f7c090307173ee38c11621c6b10e3011d.tar.bz2 |
Add traces in compositor, views and skia
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/8440008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108174 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.cc')
-rw-r--r-- | views/view.cc | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/views/view.cc b/views/view.cc index 396839c..723f77c 100644 --- a/views/view.cc +++ b/views/view.cc @@ -652,7 +652,7 @@ void View::SchedulePaintInRect(const gfx::Rect& rect) { } void View::Paint(gfx::Canvas* canvas) { - TRACE_EVENT0("View", "Paint"); + TRACE_EVENT0("views", "View::Paint"); ScopedCanvas scoped_canvas(canvas); @@ -1044,30 +1044,44 @@ void View::NativeViewHierarchyChanged(bool attached, // Painting -------------------------------------------------------------------- void View::PaintChildren(gfx::Canvas* canvas) { + TRACE_EVENT0("views", "View::PaintChildren"); 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"); OnPaintBackground(canvas); OnPaintFocusBorder(canvas); OnPaintBorder(canvas); } void View::OnPaintBackground(gfx::Canvas* canvas) { - if (background_.get()) + if (background_.get()) { + TRACE_EVENT2("views", "View::OnPaintBackground", + "width", canvas->GetSkCanvas()->getDevice()->width(), + "height", canvas->GetSkCanvas()->getDevice()->height()); background_->Paint(canvas, this); + } } void View::OnPaintBorder(gfx::Canvas* canvas) { - if (border_.get()) + if (border_.get()) { + TRACE_EVENT2("views", "View::OnPaintBorder", + "width", canvas->GetSkCanvas()->getDevice()->width(), + "height", canvas->GetSkCanvas()->getDevice()->height()); border_->Paint(*this, canvas); + } } void View::OnPaintFocusBorder(gfx::Canvas* canvas) { - if ((IsFocusable() || IsAccessibilityFocusableInRootView()) && HasFocus()) + if ((IsFocusable() || IsAccessibilityFocusableInRootView()) && HasFocus()) { + TRACE_EVENT2("views", "views::OnPaintFocusBorder", + "width", canvas->GetSkCanvas()->getDevice()->width(), + "height", canvas->GetSkCanvas()->getDevice()->height()); canvas->DrawFocusRect(GetLocalBounds()); + } } // Accelerated Painting -------------------------------------------------------- |