| Index: src/fonts/SkFontMgr_indirect.cpp
|
| diff --git a/src/fonts/SkFontMgr_indirect.cpp b/src/fonts/SkFontMgr_indirect.cpp
|
| index 33c79c86c7c9c3439bdd2d6a85e318774e3c8567..132130f0d869c29a897dd578a0a72e6c95792de1 100644
|
| --- a/src/fonts/SkFontMgr_indirect.cpp
|
| +++ b/src/fonts/SkFontMgr_indirect.cpp
|
| @@ -175,8 +175,8 @@ void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const
|
|
|
| SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const {
|
| SkRemotableFontIdentitySet* set = fProxy->getIndex(index);
|
| - if (NULL == set) {
|
| - return NULL;
|
| + if (nullptr == set) {
|
| + return nullptr;
|
| }
|
| return new SkStyleSet_Indirect(this, index, set);
|
| }
|
| @@ -187,7 +187,7 @@ SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const
|
|
|
| SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& id) const {
|
| if (id.fDataId == SkFontIdentity::kInvalidDataId) {
|
| - return NULL;
|
| + return nullptr;
|
| }
|
|
|
| SkAutoMutexAcquire ama(fDataCacheMutex);
|
| @@ -202,7 +202,7 @@ SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& i
|
| {
|
| return entry.fTypeface;
|
| }
|
| - if (dataTypeface.get() == NULL &&
|
| + if (dataTypeface.get() == nullptr &&
|
| !entry.fTypeface->weak_expired() && entry.fTypeface->try_ref())
|
| {
|
| dataTypeface.reset(entry.fTypeface);
|
| @@ -217,22 +217,22 @@ SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& i
|
| }
|
|
|
| // No exact match, but did find a data match.
|
| - if (dataTypeface.get() != NULL) {
|
| - SkAutoTDelete<SkStreamAsset> stream(dataTypeface->openStream(NULL));
|
| - if (stream.get() != NULL) {
|
| + if (dataTypeface.get() != nullptr) {
|
| + SkAutoTDelete<SkStreamAsset> stream(dataTypeface->openStream(nullptr));
|
| + if (stream.get() != nullptr) {
|
| return fImpl->createFromStream(stream.detach(), dataTypefaceIndex);
|
| }
|
| }
|
|
|
| // No data match, request data and add entry.
|
| SkAutoTDelete<SkStreamAsset> stream(fProxy->getData(id.fDataId));
|
| - if (stream.get() == NULL) {
|
| - return NULL;
|
| + if (stream.get() == nullptr) {
|
| + return nullptr;
|
| }
|
|
|
| SkAutoTUnref<SkTypeface> typeface(fImpl->createFromStream(stream.detach(), id.fTtcIndex));
|
| - if (typeface.get() == NULL) {
|
| - return NULL;
|
| + if (typeface.get() == nullptr) {
|
| + return nullptr;
|
| }
|
|
|
| DataEntry& newEntry = fDataCache.push_back();
|
| @@ -291,11 +291,11 @@ SkTypeface* SkFontMgr_Indirect::onLegacyCreateTypeface(const char familyName[],
|
|
|
| SkAutoTUnref<SkTypeface> face(this->matchFamilyStyle(familyName, style));
|
|
|
| - if (NULL == face.get()) {
|
| - face.reset(this->matchFamilyStyle(NULL, style));
|
| + if (nullptr == face.get()) {
|
| + face.reset(this->matchFamilyStyle(nullptr, style));
|
| }
|
|
|
| - if (NULL == face.get()) {
|
| + if (nullptr == face.get()) {
|
| SkFontIdentity fontId = this->fProxy->matchIndexStyle(0, style);
|
| face.reset(this->createTypefaceFromFontId(fontId));
|
| }
|
|
|