Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: include/core/SkTextBlob.h

Issue 511783005: SkTextBlob GPipe serialization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTextBlob.h
diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h
index af29933b4ff4419608b7014f837a923d6d15bf40..0fb2402d3d0d2f474e5a4f421078d6c0692874af 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 an SkTextBlob that was serialized into a buffer.
+ *
+ * @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;
« no previous file with comments | « no previous file | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698