| Index: src/core/SkScalerContext.cpp
|
| diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
|
| index 521cb9b6b1ae28e70c6bcf9d97186650b5692c25..65873c683f7cd771854e25a5bc895d11d6df772c 100644
|
| --- a/src/core/SkScalerContext.cpp
|
| +++ b/src/core/SkScalerContext.cpp
|
| @@ -852,14 +852,14 @@ protected:
|
|
|
| extern SkScalerContext* SkCreateColorScalerContext(const SkDescriptor* desc);
|
|
|
| -SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc) const {
|
| - SkScalerContext* c = NULL; //SkCreateColorScalerContext(desc);
|
| - if (NULL == c) {
|
| - c = this->onCreateScalerContext(desc);
|
| - }
|
| - if (NULL == c) {
|
| +SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc,
|
| + bool allowFailure) const {
|
| + SkScalerContext* c = this->onCreateScalerContext(desc);
|
| +
|
| + if (!c && !allowFailure) {
|
| c = SkNEW_ARGS(SkScalerContext_Empty,
|
| (const_cast<SkTypeface*>(this), desc));
|
| }
|
| return c;
|
| }
|
| +
|
|
|