summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 21:31:25 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 21:31:25 +0000
commitdab88266ce9957ab95717bdd335095c4baa8ed40 (patch)
treeaaf8506a5857f64c27d8944a833f07057e4b2442 /webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
parentcc86185617dda840dccb009b3eb9125c877873a1 (diff)
downloadchromium_src-dab88266ce9957ab95717bdd335095c4baa8ed40.zip
chromium_src-dab88266ce9957ab95717bdd335095c4baa8ed40.tar.gz
chromium_src-dab88266ce9957ab95717bdd335095c4baa8ed40.tar.bz2
Add traces in PPB_Graphics2D
BUG=None TEST=about:tracing on PDF page Review URL: http://codereview.chromium.org/9769002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127794 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppb_graphics_2d_impl.cc')
-rw-r--r--webkit/plugins/ppapi/ppb_graphics_2d_impl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
index 9c8b2f3..f503862c 100644
--- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
@@ -7,6 +7,7 @@
#include <iterator>
#include "base/bind.h"
+#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "skia/ext/platform_canvas.h"
@@ -314,6 +315,7 @@ void PPB_Graphics2D_Impl::ReplaceContents(PP_Resource image_data) {
}
int32_t PPB_Graphics2D_Impl::Flush(PP_CompletionCallback callback) {
+ TRACE_EVENT0("pepper", "PPB_Graphics2D_Impl::Flush");
if (!callback.func)
return PP_ERROR_BLOCKS_MAIN_THREAD;
@@ -462,6 +464,7 @@ bool PPB_Graphics2D_Impl::BindToInstance(PluginInstance* new_instance) {
void PPB_Graphics2D_Impl::Paint(WebKit::WebCanvas* canvas,
const gfx::Rect& plugin_rect,
const gfx::Rect& paint_rect) {
+ TRACE_EVENT0("pepper", "PPB_Graphics2D_Impl::Paint");
ImageDataAutoMapper auto_mapper(image_data_);
const SkBitmap& backing_bitmap = *image_data_->GetMappedBitmap();
@@ -572,6 +575,7 @@ void PPB_Graphics2D_Impl::ViewInitiatedPaint() {
}
void PPB_Graphics2D_Impl::ViewFlushedPaint() {
+ TRACE_EVENT0("pepper", "PPB_Graphics2D_Impl::ViewFlushedPaint");
// Notify any "painted" callback. See |unpainted_flush_callback_| in the
// header for more.
if (!painted_flush_callback_.is_null())