| Index: src/core/SkPictureAnalyzer.cpp
|
| diff --git a/src/core/SkPictureAnalyzer.cpp b/src/core/SkPictureAnalyzer.cpp
|
| index 0ba420258bb3d389b3f5a081278e622901bfc6dc..49c4fce779271c4c981ce3ba7643a6c30567d91b 100644
|
| --- a/src/core/SkPictureAnalyzer.cpp
|
| +++ b/src/core/SkPictureAnalyzer.cpp
|
| @@ -5,8 +5,11 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| +#include "SkPath.h"
|
| #include "SkPicture.h"
|
| #include "SkPictureAnalyzer.h"
|
| +#include "SkPictureCommon.h"
|
| +#include "SkRecords.h"
|
|
|
| #if SK_SUPPORT_GPU
|
|
|
| @@ -27,7 +30,7 @@ SkPictureGpuAnalyzer::SkPictureGpuAnalyzer(const sk_sp<SkPicture>& picture,
|
| this->analyze(picture.get());
|
| }
|
|
|
| -void SkPictureGpuAnalyzer::analyze(const SkPicture* picture) {
|
| +void SkPictureGpuAnalyzer::analyzePicture(const SkPicture* picture) {
|
| if (!picture || veto_predicate(fNumSlowPaths)) {
|
| return;
|
| }
|
| @@ -35,6 +38,22 @@ void SkPictureGpuAnalyzer::analyze(const SkPicture* picture) {
|
| fNumSlowPaths += picture->numSlowPaths();
|
| }
|
|
|
| +void SkPictureGpuAnalyzer::analyzeClipPath(const SkPath& path, SkRegion::Op op, bool doAntiAlias) {
|
| + if (veto_predicate(fNumSlowPaths)) {
|
| + return;
|
| + }
|
| +
|
| + const SkRecords::ClipPath clipOp = {
|
| + SkIRect::MakeEmpty(), // Willie don't care.
|
| + path,
|
| + SkRecords::RegionOpAndAA(op, doAntiAlias)
|
| + };
|
| +
|
| + SkPathCounter counter;
|
| + counter(clipOp);
|
| + fNumSlowPaths += counter.fNumSlowPathsAndDashEffects;
|
| +}
|
| +
|
| void SkPictureGpuAnalyzer::reset() {
|
| fNumSlowPaths = 0;
|
| }
|
|
|