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

Unified Diff: src/ports/SkFontMgr_android.cpp

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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/ports/SkFontHost_mac.cpp ('k') | src/ports/SkFontMgr_android_parser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_android.cpp
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
index 93a7d8659f9e16fead6f66f11ffd6a8e4445d9e7..ead0bf0b834d194f3b29706f95011704131dd846 100644
--- a/src/ports/SkFontMgr_android.cpp
+++ b/src/ports/SkFontMgr_android.cpp
@@ -388,7 +388,7 @@ protected:
uint16_t glyphID;
paint.textToGlyphs(&character, sizeof(character), &glyphID);
if (glyphID != 0) {
- return face.detach();
+ return face.release();
}
}
return nullptr;
@@ -438,7 +438,7 @@ protected:
SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const override {
SkAutoTDelete<SkStreamAsset> stream(SkStream::NewFromFile(path));
- return stream.get() ? this->createFromStream(stream.detach(), ttcIndex) : nullptr;
+ return stream.get() ? this->createFromStream(stream.release(), ttcIndex) : nullptr;
}
SkTypeface* onCreateFromStream(SkStreamAsset* bareStream, int ttcIndex) const override {
@@ -449,7 +449,7 @@ protected:
if (!fScanner.scanFont(stream, ttcIndex, &name, &style, &isFixedPitch, nullptr)) {
return nullptr;
}
- SkFontData* data(new SkFontData(stream.detach(), ttcIndex, nullptr, 0));
+ SkFontData* data(new SkFontData(stream.release(), ttcIndex, nullptr, 0));
return new SkTypeface_AndroidStream(data, style, isFixedPitch, name);
}
@@ -471,7 +471,7 @@ protected:
SkAutoSTMalloc<4, SkFixed> axisValues(axisDefinitions.count());
Scanner::computeAxisValues(axisDefinitions, paramAxes, paramAxisCount, axisValues, name);
- SkFontData* data(new SkFontData(stream.detach(), params.getCollectionIndex(),
+ SkFontData* data(new SkFontData(stream.release(), params.getCollectionIndex(),
axisValues.get(), axisDefinitions.count()));
return new SkTypeface_AndroidStream(data, style, isFixedPitch, name);
}
« no previous file with comments | « src/ports/SkFontHost_mac.cpp ('k') | src/ports/SkFontMgr_android_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698