Chromium Code Reviews| Index: include/core/SkTextBlob.h |
| diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h |
| index af29933b4ff4419608b7014f837a923d6d15bf40..69bfe8329c7d406ff6125b3772c94d179d0377c4 100644 |
| --- a/include/core/SkTextBlob.h |
| +++ b/include/core/SkTextBlob.h |
| @@ -32,6 +32,20 @@ public: |
| */ |
| uint32_t uniqueID() const; |
| + /** |
| + * Serialize to a buffer. |
| + */ |
| + void flatten(SkWriteBuffer&) const; |
| + |
| + /** |
| + * Recreate a picture that was serialized into a buffer. |
|
mtklein
2014/08/28 18:53:27
picture -> SkTextBlob ?
f(malita)
2014/08/28 19:02:45
Doh. Done.
|
| + * |
| + * @param SkReadBuffer Serialized blob data. |
| + * @return A new SkTextBlob representing the serialized data, or NULL if the buffer is |
| + * invalid. |
| + */ |
| + static const SkTextBlob* CreateFromBuffer(SkReadBuffer&); |
| + |
| private: |
| enum GlyphPositioning { |
| kDefault_Positioning = 0, // Default glyph advances -- zero scalars per glyph. |
| @@ -70,13 +84,9 @@ private: |
| SkTextBlob(uint16_t* glyphs, SkScalar* pos, const SkTArray<Run>* runs, const SkRect& bounds); |
| - void flatten(SkWriteBuffer&) const; |
| - static const SkTextBlob* CreateFromBuffer(SkReadBuffer&); |
| - |
| static unsigned ScalarsPerGlyph(GlyphPositioning pos); |
| friend class SkCanvas; |
| - friend class SkPictureData; |
| friend class SkTextBlobBuilder; |
| friend class TextBlobTester; |