SkTextBlob plumbing
Add SkTextBlob serialization + drawTextBlob() overrides.
R=mtklein@google.com, reed@google.com, robertphillips@google.com
BUG=269080
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/499413002
diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h
index fcf1766..af29933 100644
--- a/include/core/SkTextBlob.h
+++ b/include/core/SkTextBlob.h
@@ -13,6 +13,9 @@
#include "SkTArray.h"
#include "SkTDArray.h"
+class SkReadBuffer;
+class SkWriteBuffer;
+
/** \class SkTextBlob
SkTextBlob combines multiple text runs into an immutable, ref-counted structure.
@@ -67,7 +70,13 @@
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;