diff options
author | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-23 01:28:31 +0000 |
---|---|---|
committer | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-23 01:28:31 +0000 |
commit | 2fb1a5b4101430edb2348a26becdfcd4c29fe0b0 (patch) | |
tree | 1ab626dbda46070c7e0e872e9fe6d830dec06110 /skia/ext/image_operations.cc | |
parent | a98107cffe1526eb9872588c4244dfc1bf0e72d0 (diff) | |
download | chromium_src-2fb1a5b4101430edb2348a26becdfcd4c29fe0b0.zip chromium_src-2fb1a5b4101430edb2348a26becdfcd4c29fe0b0.tar.gz chromium_src-2fb1a5b4101430edb2348a26becdfcd4c29fe0b0.tar.bz2 |
Adding traces around skia image resizes so we know when they happen.
Review URL: http://codereview.chromium.org/7711021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97798 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/image_operations.cc')
-rw-r--r-- | skia/ext/image_operations.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/skia/ext/image_operations.cc b/skia/ext/image_operations.cc index 23cce45..0f19d21 100644 --- a/skia/ext/image_operations.cc +++ b/skia/ext/image_operations.cc @@ -10,6 +10,7 @@ #include "skia/ext/image_operations.h" // TODO(pkasting): skia/ext should not depend on base/! +#include "base/debug/trace_event.h" #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/stack_container.h" @@ -368,6 +369,9 @@ SkBitmap ImageOperations::Resize(const SkBitmap& source, SkBitmap ImageOperations::ResizeSubpixel(const SkBitmap& source, int dest_width, int dest_height, const SkIRect& dest_subset) { + TRACE_EVENT2("skia", "ImageOperations::ResizeSubpixel", + "src_pixels", source.width()*source.height(), + "dst_pixels", dest_width*dest_height); // Currently only works on Linux/BSD because these are the only platforms // where SkFontHost::GetSubpixelOrder is defined. #if defined(OS_POSIX) && !defined(OS_MACOSX) @@ -471,6 +475,9 @@ SkBitmap ImageOperations::ResizeBasic(const SkBitmap& source, ResizeMethod method, int dest_width, int dest_height, const SkIRect& dest_subset) { + TRACE_EVENT2("skia", "ImageOperations::ResizeBasic", + "src_pixels", source.width()*source.height(), + "dst_pixels", dest_width*dest_height); // Ensure that the ResizeMethod enumeration is sound. SkASSERT(((RESIZE_FIRST_QUALITY_METHOD <= method) && (method <= RESIZE_LAST_QUALITY_METHOD)) || |