Additional trace events for SVG parse and render operations

Helpful for analyzing SVG parsing vs. rendering time.

Bug: skia:11851
Change-Id: I64e7002de1846e9c426d59382611e6b0902ada09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396776
Commit-Queue: Dominik Röttsches <drott@google.com>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
diff --git a/modules/svg/src/SkSVGDOM.cpp b/modules/svg/src/SkSVGDOM.cpp
index 7915654..4d26afe 100644
--- a/modules/svg/src/SkSVGDOM.cpp
+++ b/modules/svg/src/SkSVGDOM.cpp
@@ -46,6 +46,7 @@
 #include "modules/svg/include/SkSVGUse.h"
 #include "modules/svg/include/SkSVGValue.h"
 #include "src/core/SkTSearch.h"
+#include "src/core/SkTraceEvent.h"
 #include "src/xml/SkDOM.h"
 
 namespace {
@@ -392,6 +393,7 @@
 }
 
 sk_sp<SkSVGDOM> SkSVGDOM::Builder::make(SkStream& str) const {
+    TRACE_EVENT0("skia", TRACE_FUNC);
     SkDOM xmlDom;
     if (!xmlDom.build(str)) {
         return nullptr;
@@ -429,6 +431,7 @@
 }
 
 void SkSVGDOM::render(SkCanvas* canvas) const {
+    TRACE_EVENT0("skia", TRACE_FUNC);
     if (fRoot) {
         SkSVGLengthContext       lctx(fContainerSize);
         SkSVGPresentationContext pctx;