| Index: src/core/SkFontDescriptor.h
|
| diff --git a/src/core/SkFontDescriptor.h b/src/core/SkFontDescriptor.h
|
| index 5a6ddd5e414ae6bc2d05ee1553530ce478b25ee5..aafbe84decc9415363f0cfc400b39e0fbdcdb810 100644
|
| --- a/src/core/SkFontDescriptor.h
|
| +++ b/src/core/SkFontDescriptor.h
|
| @@ -12,11 +12,10 @@
|
| #include "SkString.h"
|
| #include "SkTypeface.h"
|
|
|
| -class SkWStream;
|
| -
|
| class SkFontDescriptor {
|
| public:
|
| SkFontDescriptor(SkTypeface::Style = SkTypeface::kNormal);
|
| + // Does not affect ownership of SkStream.
|
| SkFontDescriptor(SkStream*);
|
|
|
| void serialize(SkWStream*);
|
| @@ -28,7 +27,9 @@ public:
|
| const char* getFullName() const { return fFullName.c_str(); }
|
| const char* getPostscriptName() const { return fPostscriptName.c_str(); }
|
| const char* getFontFileName() const { return fFontFileName.c_str(); }
|
| - SkStream* getFontData() const { return fFontData; }
|
| + bool hasFontData() const { return fFontData.get() != NULL; }
|
| + // Transfers ownership to the caller.
|
| + SkStream* transferFontData() { return fFontData.detach(); }
|
| int getFontIndex() const { return fFontIndex; }
|
|
|
| void setFamilyName(const char* name) { fFamilyName.set(name); }
|
| @@ -46,7 +47,7 @@ private:
|
| SkString fFullName;
|
| SkString fPostscriptName;
|
| SkString fFontFileName;
|
| - SkAutoTUnref<SkStream> fFontData;
|
| + SkAutoTDelete<SkStream> fFontData;
|
| int fFontIndex;
|
|
|
| SkTypeface::Style fStyle;
|
|
|