SkPDF: add canon assert before adding code that might break it
Motivation: We can write subsets (by page) of pdf documents (but this
in't yet exposed in the public API), but it is a bad idea to mix pages
from multiple documents (de-duping will break). This assert verifies
that we don't do this by accident in the future.
BUG=skia:3585
Review URL: https://codereview.chromium.org/1037573005
diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h
index a90ea11..047841d 100644
--- a/src/pdf/SkPDFDevice.h
+++ b/src/pdf/SkPDFDevice.h
@@ -180,6 +180,10 @@
return *(fFontGlyphUsage.get());
}
+#ifdef SK_DEBUG
+ SkPDFCanon* getCanon() const { return fCanon; }
+#endif // SK_DEBUG
+
protected:
const SkBitmap& onAccessBitmap() SK_OVERRIDE {
return fLegacyBitmap;