Index: src/core/SkScalerContext.cpp |
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp |
index cf4098bbdda9ccc07358d55415b6693f883e4aa8..3db9e308760da15acf06c219fe7fa3ab032ee2b5 100644 |
--- a/src/core/SkScalerContext.cpp |
+++ b/src/core/SkScalerContext.cpp |
@@ -62,15 +62,14 @@ void SkGlyph::zeroMetrics() { |
#define DUMP_RECx |
#endif |
-static SkFlattenable* load_flattenable(const SkDescriptor* desc, uint32_t tag, |
- SkFlattenable::Type ft) { |
+static SkFlattenable* load_flattenable(const SkDescriptor* desc, uint32_t tag) { |
SkFlattenable* obj = nullptr; |
uint32_t len; |
const void* data = desc->findEntry(tag, &len); |
if (data) { |
SkReadBuffer buffer(data, len); |
- obj = buffer.readFlattenable(ft); |
+ obj = buffer.readFlattenable(); |
SkASSERT(buffer.offset() == buffer.size()); |
} |
return obj; |
@@ -80,12 +79,9 @@ SkScalerContext::SkScalerContext(SkTypeface* typeface, const SkDescriptor* desc) |
: fRec(*static_cast<const Rec*>(desc->findEntry(kRec_SkDescriptorTag, nullptr))) |
, fTypeface(SkRef(typeface)) |
- , fPathEffect(static_cast<SkPathEffect*>(load_flattenable(desc, kPathEffect_SkDescriptorTag, |
- SkFlattenable::kSkPathEffect_Type))) |
- , fMaskFilter(static_cast<SkMaskFilter*>(load_flattenable(desc, kMaskFilter_SkDescriptorTag, |
- SkFlattenable::kSkMaskFilter_Type))) |
- , fRasterizer(static_cast<SkRasterizer*>(load_flattenable(desc, kRasterizer_SkDescriptorTag, |
- SkFlattenable::kSkRasterizer_Type))) |
+ , fPathEffect(static_cast<SkPathEffect*>(load_flattenable(desc, kPathEffect_SkDescriptorTag))) |
+ , fMaskFilter(static_cast<SkMaskFilter*>(load_flattenable(desc, kMaskFilter_SkDescriptorTag))) |
+ , fRasterizer(static_cast<SkRasterizer*>(load_flattenable(desc, kRasterizer_SkDescriptorTag))) |
// Initialize based on our settings. Subclasses can also force this. |
, fGenerateImageFromPath(fRec.fFrameWidth > 0 || fPathEffect != nullptr || fRasterizer != nullptr) |