Index: src/pdf/SkPDFCanon.h |
diff --git a/src/pdf/SkPDFCanon.h b/src/pdf/SkPDFCanon.h |
index 6a677e9a68920d8038aef6eb9564fb3dc71955f3..228efe303d22315addd1c17272fe46bcce19edd0 100644 |
--- a/src/pdf/SkPDFCanon.h |
+++ b/src/pdf/SkPDFCanon.h |
@@ -8,25 +8,14 @@ |
#define SkPDFCanon_DEFINED |
#include "SkPDFShader.h" |
-#include "SkThread.h" |
#include "SkTDArray.h" |
-struct SkIRect; |
class SkBitmap; |
-class SkMatrix; |
class SkPDFFont; |
class SkPDFGraphicState; |
class SkPDFBitmap; |
class SkPaint; |
-// This class's fields and methods will eventually become part of |
-// SkPDFDocument/SkDocument_PDF. For now, it exists as a singleton to |
-// preflight that transition. This replaces three global arrays in |
-// SkPDFFont, SkPDFShader, and SkPDFGraphicsContext. |
-// |
-// IF YOU ARE LOOKING AT THIS API PLEASE DO NOT WRITE THE CHANGE |
-// YOU ARE ABOUT TO WRITE WITHOUT TALKING TO HALCANARY@. |
-// |
// Note that this class does not create, delete, reference or |
// dereference the SkPDFObject objects that it indexes. It is up to |
// the caller to manage the lifetime of these objects. |
@@ -35,15 +24,6 @@ public: |
SkPDFCanon(); |
~SkPDFCanon(); |
- static SkPDFCanon& GetCanon(); |
- |
- // This mutexes will be removed once this class is subsumed into |
- // SkPDFDocument. |
- static SkBaseMutex& GetFontMutex(); |
- static SkBaseMutex& GetShaderMutex(); |
- static SkBaseMutex& GetPaintMutex(); |
- static SkBaseMutex& GetBitmapMutex(); |
- |
// Returns exact match if there is one. If not, it returns NULL. |
// If there is no exact match, but there is a related font, we |
// still return NULL, but also set *relatedFont. |
@@ -73,6 +53,15 @@ public: |
void addBitmap(SkPDFBitmap*); |
void removeBitmap(SkPDFBitmap*); |
+ void assertEmpty() const { |
+ SkASSERT(fFontRecords.isEmpty()); |
+ SkASSERT(fFunctionShaderRecords.isEmpty()); |
+ SkASSERT(fAlphaShaderRecords.isEmpty()); |
+ SkASSERT(fImageShaderRecords.isEmpty()); |
+ SkASSERT(fGraphicStateRecords.isEmpty()); |
+ SkASSERT(fBitmapRecords.isEmpty()); |
+ } |
+ |
private: |
struct FontRec { |
SkPDFFont* fFont; |