aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-31 00:04:25 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-31 00:04:25 +0000
commit6169f2b4da39099b4e593f5ff85538dfe2f0249e (patch)
tree2f8f04d595050e97c99ac50ef234846081c242f7 /tests
parentb5302b2cb40ae8d240b12107dfa80ce8e9208b90 (diff)
initial import of Chrome's trace_event into skia framework
This patch includes a modified version of Chrome's trace_event.h, which provides tracing macros that can easily integrate into the about://tracing framework. Currently the macros link to a default implementation of the (narrow) tracing class SkDefaultEventTracer which does nothing; next step will be to have Chrome subclass the SkEventTracer with a shim that bolts Skia's trace events to its own, allowing Skia's trace events to show up in about://tracing. I've verified that this file builds properly, and when I added a simple scoped TRACE_EVENT0 to SkCanvas::drawRect, along with some debug prints in the NOP implementation of tracing, I saw what I expected printed to the screen. BUG=skia: R=nduca@chromium.org, reed@google.com, mtklein@google.com, bsalomon@google.com Author: humper@google.com Review URL: https://codereview.chromium.org/149563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13256 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/TracingTest.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/TracingTest.cpp b/tests/TracingTest.cpp
new file mode 100644
index 0000000000..730a46ce4d
--- /dev/null
+++ b/tests/TracingTest.cpp
@@ -0,0 +1,13 @@
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkTraceEvent.h"
+#include "Test.h"
+
+DEF_TEST(Tracing, reporter) {
+ TRACE_EVENT0("skia.testing", "just a test");
+}