Index: include/core/SkTextBlob.h |
diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h |
index 3c5d87359aac99a8fc3288d7a3c4ece76a940cf0..1addb6f9142e11b7252ec3a534f50b571bfee44e 100644 |
--- a/include/core/SkTextBlob.h |
+++ b/include/core/SkTextBlob.h |
@@ -43,7 +43,11 @@ public: |
* @return A new SkTextBlob representing the serialized data, or NULL if the buffer is |
* invalid. |
*/ |
- static const SkTextBlob* CreateFromBuffer(SkReadBuffer&); |
+ static sk_sp<SkTextBlob> MakeFromBuffer(SkReadBuffer&); |
+ |
+ static const SkTextBlob* CreateFromBuffer(SkReadBuffer& buffer) { |
+ return MakeFromBuffer(buffer).release(); |
+ } |
enum GlyphPositioning { |
kDefault_Positioning = 0, // Default glyph advances -- zero scalars per glyph. |
@@ -99,7 +103,11 @@ public: |
* Returns an immutable SkTextBlob for the current runs/glyphs. The builder is reset and |
* can be reused. |
*/ |
- const SkTextBlob* build(); |
+ sk_sp<SkTextBlob> make(); |
+ |
+ const SkTextBlob* build() { |
+ return this->make().release(); |
+ } |
/** |
* Glyph and position buffers associated with a run. |