Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: src/core/SkScalerContext.cpp

Issue 473543004: Revert of Remove SkPaintOptionsAndroid (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkScalerContext.h ('k') | src/ports/SkFontConfigParser_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScalerContext.cpp
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index db3c0fb2f57e04c4aa490fb95638fd393d4b0d42..11208fec599bad1ca0dfeef7f3bab9c23f00dc96 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -22,6 +22,10 @@
#include "SkRasterClip.h"
#include "SkStroke.h"
#include "SkThread.h"
+
+#ifdef SK_BUILD_FOR_ANDROID
+ #include "SkTypeface_android.h"
+#endif
#define ComputeBWRowBytes(width) (((unsigned)(width) + 7) >> 3)
@@ -107,6 +111,15 @@
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() {
« no previous file with comments | « src/core/SkScalerContext.h ('k') | src/ports/SkFontConfigParser_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698