aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Xiao Yu <xster@google.com>2018-04-25 18:11:44 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-26 13:47:43 +0000
commit97126018d9d3944224676b6f4664da2a30e5ab1f (patch)
tree61f3f6a3796aea16424ff00e85bb2371c993fcad
parent1178ea0f7b111da2a7007afb619b07383b7a320c (diff)
Add more granularity inside of SkCanvas::Flush traces.
We currently just get a big nondescript block when trying to understand what's taking rendering time. This will help us get an idea of the general categories of time consuming things when we toggle skia traces on. Bug: skia: Change-Id: Ia231cfc0e6e984172ad04547e95e269e8cc2d12a Reviewed-on: https://skia-review.googlesource.com/123820 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
-rw-r--r--src/gpu/GrRenderTargetOpList.cpp2
-rw-r--r--src/gpu/ops/GrOp.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp
index a68d78ac65..b53b4006c8 100644
--- a/src/gpu/GrRenderTargetOpList.cpp
+++ b/src/gpu/GrRenderTargetOpList.cpp
@@ -145,9 +145,7 @@ bool GrRenderTargetOpList::onExecute(GrOpFlushState* flushState) {
}
SkASSERT(fTarget.get()->priv().peekRenderTarget());
-#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
TRACE_EVENT0("skia", TRACE_FUNC);
-#endif
// TODO: at the very least, we want the stencil store op to always be discard (at this
// level). In Vulkan, sub-command buffers would still need to load & store the stencil buffer.
diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h
index 50edcf9611..96d39d32c3 100644
--- a/src/gpu/ops/GrOp.h
+++ b/src/gpu/ops/GrOp.h
@@ -11,6 +11,7 @@
#include "../private/SkAtomics.h"
#include "GrGpuResource.h"
#include "GrNonAtomicRef.h"
+#include "GrTracing.h"
#include "GrXferProcessor.h"
#include "SkMatrix.h"
#include "SkRect.h"
@@ -151,7 +152,10 @@ public:
void prepare(GrOpFlushState* state) { this->onPrepare(state); }
/** Issues the op's commands to GrGpu. */
- void execute(GrOpFlushState* state) { this->onExecute(state); }
+ void execute(GrOpFlushState* state) {
+ TRACE_EVENT0("skia", name());
+ this->onExecute(state);
+ }
/** Used for spewing information about ops when debugging. */
virtual SkString dumpInfo() const {