Index: src/pdf/SkPDFTypes.cpp |
diff --git a/src/pdf/SkPDFTypes.cpp b/src/pdf/SkPDFTypes.cpp |
index 43361fcf44df5e5b1fd3b2631d465e30603f8329..4cd48f4757e55a5f081ee517d3ae6bbb03b3838b 100644 |
--- a/src/pdf/SkPDFTypes.cpp |
+++ b/src/pdf/SkPDFTypes.cpp |
@@ -506,3 +506,17 @@ int32_t SkPDFObjNumMap::getObjectNumber(SkPDFObject* obj) const { |
return *objectNumberFound; |
} |
+#ifdef SK_PDF_IMAGE_STATS |
+SkAtomic<int> gDrawImageCalls(0); |
+SkAtomic<int> gJpegImageObjects(0); |
+SkAtomic<int> gRegularImageObjects(0); |
+ |
+void SkPDFImageDumpStats() { |
+ SkDebugf("\ntotal PDF drawImage/drawBitmap calls: %d\n" |
+ "total PDF jpeg images: %d\n" |
+ "total PDF regular images: %d\n", |
+ gDrawImageCalls.load(), |
+ gJpegImageObjects.load(), |
+ gRegularImageObjects.load()); |
+} |
+#endif // SK_PDF_IMAGE_STATS |