Index: src/core/SkPicture.cpp |
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp |
index fa4c103d5ce1ca5506a5fc7b7731b7bf9c24572a..ab00000de411a3efc663e0cd34c8e16ed381a641 100644 |
--- a/src/core/SkPicture.cpp |
+++ b/src/core/SkPicture.cpp |
@@ -455,3 +455,15 @@ void SkPicture::callDeletionListeners() { |
fDeletionListeners.unrefAll(); |
} |
+ |
+// fRecord OK |
+int SkPicture::approximateOpCount() const { |
+ SkASSERT(fRecord.get() || fData.get()); |
+ if (fRecord.get()) { |
+ return fRecord->count(); |
+ } |
+ if (fData.get()) { |
+ return fData->opCount(); |
+ } |
+ return 0; |
+} |