Index: src/pdf/SkPDFTypes.h |
diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h |
index 1f06c4c5fe63dc4cac3efb5991d066601ee97499..004c767843a569ac16f060e6495ac7751aa6813e 100644 |
--- a/src/pdf/SkPDFTypes.h |
+++ b/src/pdf/SkPDFTypes.h |
@@ -369,7 +369,7 @@ public: |
/** The size of the dictionary. |
*/ |
- int size() { return fValue.count(); } |
+ int size() const; |
/** Add the value to the dictionary with the given key. Refs value. |
* @param key The key for this dictionary entry. |
@@ -424,28 +424,30 @@ public: |
*/ |
void clear(); |
+protected: |
+ /** Use to remove a single key from the dictionary. |
+ */ |
+ void remove(const char key[]); |
+ |
+ /** Insert references to all of the key-value pairs from the other |
+ * dictionary into this one. |
+ */ |
+ void mergeFrom(const SkPDFDict& other); |
+ |
private: |
struct Rec { |
- SkPDFName* key; |
- SkPDFObject* value; |
+ SkPDFName* key; |
+ SkPDFObject* value; |
+ Rec(SkPDFName* k, SkPDFObject* v) : key(k), value(v) {} |
}; |
-public: |
- class Iter { |
- public: |
- explicit Iter(const SkPDFDict& dict); |
- SkPDFName* next(SkPDFObject** value); |
- |
- private: |
- const Rec* fIter; |
- const Rec* fStop; |
- }; |
- |
-private: |
static const int kMaxLen = 4095; |
+ mutable SkMutex fMutex; // protects modifications to fValue |
SkTDArray<struct Rec> fValue; |
+ SkPDFObject* append(SkPDFName* key, SkPDFObject* value); |
+ |
typedef SkPDFObject INHERITED; |
}; |