diff options
-rw-r--r-- | include/core/SkPictureAnalyzer.h | 6 | ||||
-rw-r--r-- | src/core/SkPictureAnalyzer.cpp | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/core/SkPictureAnalyzer.h b/include/core/SkPictureAnalyzer.h index b58807ca89..c46ca1e854 100644 --- a/include/core/SkPictureAnalyzer.h +++ b/include/core/SkPictureAnalyzer.h @@ -48,6 +48,12 @@ public: */ bool suitableForGpuRasterization(const char** whyNot = nullptr) const; + /** + * Returns the number of commands which are slow to draw on the GPU, capped at the predicate + * max. + */ + uint32_t numSlowGpuCommands() { return fNumSlowPaths; } + private: uint32_t fNumSlowPaths; diff --git a/src/core/SkPictureAnalyzer.cpp b/src/core/SkPictureAnalyzer.cpp index 9f62d1dafe..b1d61aebba 100644 --- a/src/core/SkPictureAnalyzer.cpp +++ b/src/core/SkPictureAnalyzer.cpp @@ -31,7 +31,7 @@ SkPictureGpuAnalyzer::SkPictureGpuAnalyzer(const sk_sp<SkPicture>& picture, } void SkPictureGpuAnalyzer::analyzePicture(const SkPicture* picture) { - if (!picture || veto_predicate(fNumSlowPaths)) { + if (!picture) { return; } @@ -39,10 +39,6 @@ void SkPictureGpuAnalyzer::analyzePicture(const SkPicture* picture) { } 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, |