aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScalerContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkScalerContext.cpp')
-rw-r--r--src/core/SkScalerContext.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index db3c0fb2f5..11208fec59 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -23,6 +23,10 @@
#include "SkStroke.h"
#include "SkThread.h"
+#ifdef SK_BUILD_FOR_ANDROID
+ #include "SkTypeface_android.h"
+#endif
+
#define ComputeBWRowBytes(width) (((unsigned)(width) + 7) >> 3)
void SkGlyph::toMask(SkMask* mask) const {
@@ -107,6 +111,15 @@ SkScalerContext::SkScalerContext(SkTypeface* typeface, const SkDescriptor* desc)
desc->findEntry(kPathEffect_SkDescriptorTag, NULL),
desc->findEntry(kMaskFilter_SkDescriptorTag, NULL));
#endif
+#ifdef SK_BUILD_FOR_ANDROID
+ uint32_t len;
+ const void* data = desc->findEntry(kAndroidOpts_SkDescriptorTag, &len);
+ if (data) {
+ SkReadBuffer buffer(data, len);
+ fPaintOptionsAndroid.unflatten(buffer);
+ SkASSERT(buffer.offset() == buffer.size());
+ }
+#endif
}
SkScalerContext::~SkScalerContext() {