diff options
author | Yuqian Li <liyuqian@google.com> | 2018-08-29 16:25:47 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-08-30 01:07:58 +0000 |
commit | f7c723c93d26ca3fcefd151d3a97b21fd607807e (patch) | |
tree | 81e092750315079e5d0dfbd9d46bd6e2e61f2ed7 /src | |
parent | 48cb22360d3270c7d378db3a878d0bec6cc89f20 (diff) | |
download | skqp-f7c723c93d26ca3fcefd151d3a97b21fd607807e.tar.gz |
Add tracing to saveLayer
I think this would be helpful for tracing as saveLayer is usually very costly.
Bug: skia:
Change-Id: Ia5bc194d6a7346c6fbec54da86065dc95d36f612
Reviewed-on: https://skia-review.googlesource.com/150115
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkCanvas.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 19153abd22..9566a34b43 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -920,6 +920,7 @@ int SkCanvas::saveLayerPreserveLCDTextRequests(const SkRect* bounds, const SkPai } int SkCanvas::saveLayer(const SaveLayerRec& rec) { + TRACE_EVENT0("skia", TRACE_FUNC); if (rec.fPaint && rec.fPaint->nothingToDraw()) { // no need for the layer (or any of the draws until the matching restore() this->save(); @@ -974,6 +975,7 @@ static SkImageInfo make_layer_info(const SkImageInfo& prev, int w, int h, const } void SkCanvas::internalSaveLayer(const SaveLayerRec& rec, SaveLayerStrategy strategy) { + TRACE_EVENT0("skia", TRACE_FUNC); const SkRect* bounds = rec.fBounds; const SkPaint* paint = rec.fPaint; SaveLayerFlags saveLayerFlags = rec.fSaveLayerFlags; |