diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-09 20:54:20 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-09 20:54:20 +0000 |
commit | 14451703f1a53d0ff14ffe4f44436526383a5fd4 (patch) | |
tree | 768b16530b1f97d6e1c9ddca4b14fca1c1268c71 /src/core/SkScalerContext.cpp | |
parent | 4a8084ced3fa5c73a364f96cadfa1fbfbea24ff6 (diff) |
API modifications needed to upstream Android font changes.
R=reed@google.com
Author: djsollen@google.com
Review URL: https://chromiumcodereview.appspot.com/14761003
git-svn-id: http://skia.googlecode.com/svn/trunk@9083 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkScalerContext.cpp')
-rw-r--r-- | src/core/SkScalerContext.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index ba14908c2e..a7e2432cc1 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -110,6 +110,14 @@ 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); + SkASSERT(data); + SkOrderedReadBuffer buffer(data, len); + fPaintOptionsAndroid.unflatten(buffer); + SkASSERT(buffer.offset() == buffer.size()); +#endif } SkScalerContext::~SkScalerContext() { @@ -125,7 +133,8 @@ SkScalerContext::~SkScalerContext() { SkScalerContext* SkScalerContext::allocNextContext() const { #ifdef SK_BUILD_FOR_ANDROID SkTypeface* newFace = SkAndroidNextLogicalTypeface(fRec.fFontID, - fRec.fOrigFontID); + fRec.fOrigFontID, + fPaintOptionsAndroid); if (0 == newFace) { return NULL; } |