Index: src/core/SkPaint.cpp |
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp |
index aa1b8e4803b956ca5b899ee8e6dfc9c9c5f039ab..24bc26d821801c435bf29d669b45dd6d08422618 100644 |
--- a/src/core/SkPaint.cpp |
+++ b/src/core/SkPaint.cpp |
@@ -180,14 +180,19 @@ uint32_t SkPaint::getGenerationID() const { |
void SkPaint::setGenerationID(uint32_t generationID) { |
fGenerationID = generationID; |
} |
-#endif |
-#ifdef SK_BUILD_FOR_ANDROID |
unsigned SkPaint::getBaseGlyphCount(SkUnichar text) const { |
SkAutoGlyphCache autoCache(*this, NULL, NULL); |
SkGlyphCache* cache = autoCache.getCache(); |
return cache->getBaseGlyphCount(text); |
} |
+ |
+void SkPaint::setPaintOptionsAndroid(const SkPaintOptionsAndroid& options) { |
+ if(!memcmp(&fPaintOptionsAndroid, &options, sizeof(SkPaintOptionsAndroid))) { |
+ fPaintOptionsAndroid = options; |
+ GEN_ID_INC; |
+ } |
+} |
#endif |
void SkPaint::setHinting(Hinting hintingLevel) { |
@@ -1651,6 +1656,10 @@ void SkScalerContext::MakeRec(const SkPaint& paint, |
#endif |
rec->fReservedAlign = 0; |
+ |
+#ifdef SK_BUILD_FOR_ANDROID |
+ rec->fPaintOptionsAndroid = paint.getPaintOptionsAndroid(); |
+#endif //SK_BUILD_FOR_ANDROID |
/* Allow the fonthost to modify our rec before we use it as a key into the |
cache. This way if we're asking for something that they will ignore, |