aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPictureCommon.h
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2016-05-25 11:31:04 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-25 11:31:04 -0700
commitb5fc58e1de6c2428f786034262a2ecdc8388d21d (patch)
treea3c81e24d8118339a5ca9590797c12317582d886 /src/core/SkPictureCommon.h
parentf34cd632d777e8f8be2ec1f4f3a0c363a7a6214d (diff)
Complex clipPath accounting
Add a clipPath heuristic to SkPathCounter, and extend SkPictureGpuAnalyzer to support external clipPath() op accounting. BUG=skia:5347 R=reed@google.com,mtklein@google.com,senorblanco@chromium.org,bsalomon@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2000423005 Review-Url: https://codereview.chromium.org/2000423005
Diffstat (limited to 'src/core/SkPictureCommon.h')
-rw-r--r--src/core/SkPictureCommon.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/SkPictureCommon.h b/src/core/SkPictureCommon.h
index 16146be020..1c38b049fa 100644
--- a/src/core/SkPictureCommon.h
+++ b/src/core/SkPictureCommon.h
@@ -123,6 +123,13 @@ struct SkPathCounter {
}
}
+ void operator()(const SkRecords::ClipPath& op) {
+ // TODO: does the SkRegion op matter?
+ if (op.opAA.aa && !op.path.isConvex()) {
+ fNumSlowPathsAndDashEffects++;
+ }
+ }
+
void operator()(const SkRecords::SaveLayer& op) {
this->checkPaint(AsPtr(op.paint));
}