aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-07-19 10:53:20 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-19 15:41:34 +0000
commitdcbb9d90db0e07b7a3625bcdab3af11ab44c4cfe (patch)
tree53f66c3a874feb791aa373597282286f08803f03 /dm
parent925f52d03b731c49c1a2b52c6ced53169a1df669 (diff)
Add SkDebugf trace event handler.
Also adds more trace events to GPU backend. Change-Id: Ifa5f0cd4b1fd582f0cc30d37d9e6414dc498c75d Reviewed-on: https://skia-review.googlesource.com/24622 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'dm')
-rw-r--r--dm/DM.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index b701bcc8cf..ef048a48d7 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -19,6 +19,8 @@
#include "SkCommonFlagsConfig.h"
#include "SkCommonFlagsPathRenderer.h"
#include "SkData.h"
+#include "SkDebugfTracer.h"
+#include "SkEventTracer.h"
#include "SkFontMgr.h"
#include "SkGraphics.h"
#include "SkHalf.h"
@@ -29,6 +31,7 @@
#include "SkOSPath.h"
#include "SkPM4fPriv.h"
#include "SkPngEncoder.h"
+#include "SkScan.h"
#include "SkSpinlock.h"
#include "SkTHash.h"
#include "SkTaskGroup.h"
@@ -38,7 +41,6 @@
#include "ios_utils.h"
#include "picture_utils.h"
#include "sk_tool_utils.h"
-#include "SkScan.h"
#include <vector>
@@ -236,7 +238,8 @@ static void find_culprit() {
#include <signal.h>
#if !defined(SK_BUILD_FOR_ANDROID)
#include <execinfo.h>
- #endif
+
+#endif
static constexpr int max_of() { return 0; }
template <typename... Rest>
@@ -1263,7 +1266,10 @@ extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkFontStyle )
int main(int argc, char** argv) {
SkCommandLineFlags::Parse(argc, argv);
-#if defined(SK_BUILD_FOR_IOS)
+ if (FLAGS_trace) {
+ SkAssertResult(SkEventTracer::SetInstance(new SkDebugfTracer()));
+ }
+ #if defined(SK_BUILD_FOR_IOS)
cd_Documents();
#endif
setbuf(stdout, nullptr);