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

Unified Diff: src/sfnt/SkOTUtils.cpp

Issue 1779263003: Make sp variants for SkData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/SkImageDecoder_CG.cpp ('k') | tests/CodexTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sfnt/SkOTUtils.cpp
diff --git a/src/sfnt/SkOTUtils.cpp b/src/sfnt/SkOTUtils.cpp
index 52d996fbc59c469e33e647f8c49bc483270e768a..683d750bda52a4cbef5c5f98781985cb91ca2fde 100644
--- a/src/sfnt/SkOTUtils.cpp
+++ b/src/sfnt/SkOTUtils.cpp
@@ -83,7 +83,7 @@ SkData* SkOTUtils::RenameFont(SkStreamAsset* fontData, const char* fontName, int
size_t originalDataSize = fontData->getLength() - oldNameTablePhysicalSize;
size_t newDataSize = originalDataSize + nameTablePhysicalSize;
- SkAutoTUnref<SkData> rewrittenFontData(SkData::NewUninitialized(newDataSize));
+ auto rewrittenFontData = SkData::MakeUninitialized(newDataSize);
SK_OT_BYTE* data = static_cast<SK_OT_BYTE*>(rewrittenFontData->writable_data());
if (fontData->read(data, oldNameTableOffset) < oldNameTableOffset) {
@@ -157,7 +157,7 @@ SkData* SkOTUtils::RenameFont(SkStreamAsset* fontData, const char* fontName, int
}
}
- return rewrittenFontData.detach();
+ return rewrittenFontData.release();
}
« no previous file with comments | « src/ports/SkImageDecoder_CG.cpp ('k') | tests/CodexTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698