Index: src/core/SkPaint.cpp |
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp |
index 1c2f8e83a6eba738ec542ac1f96808392556db8e..88bde227044a76b702a7a6be0f010b48b0b33928 100644 |
--- a/src/core/SkPaint.cpp |
+++ b/src/core/SkPaint.cpp |
@@ -2308,19 +2308,15 @@ const SkRect& SkPaint::doComputeFastBounds(const SkRect& origSrc, |
#ifndef SK_IGNORE_TO_STRING |
-static SkFontDescriptor typeface_getDescriptor(const SkTypeface* face) { |
- SkDynamicMemoryWStream ostream; |
- face->serialize(&ostream); |
- SkAutoTUnref<SkStreamAsset> istream(ostream.detachAsStream()); |
- return SkFontDescriptor(istream); |
bungeman-skia
2014/09/18 14:50:09
This required a copy constructor, and that seems a
|
-} |
- |
void SkPaint::toString(SkString* str) const { |
str->append("<dl><dt>SkPaint:</dt><dd><dl>"); |
SkTypeface* typeface = this->getTypeface(); |
if (typeface) { |
- SkFontDescriptor descriptor(typeface_getDescriptor(typeface)); |
+ SkDynamicMemoryWStream ostream; |
+ typeface->serialize(&ostream); |
+ SkAutoTUnref<SkStreamAsset> istream(ostream.detachAsStream()); |
+ SkFontDescriptor descriptor(istream); |
str->append("<dt>Font Family Name:</dt><dd>"); |
str->append(descriptor.getFamilyName()); |