Index: tests/SerializationTest.cpp |
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp |
index ff9b342074adc1d7d8b5d54d4c7364077cda633b..bc2770ebda0d0a9e0143a408bf115e2ceb2f7bc8 100644 |
--- a/tests/SerializationTest.cpp |
+++ b/tests/SerializationTest.cpp |
@@ -13,6 +13,7 @@ |
#include "SkImage.h" |
#include "SkImageSource.h" |
#include "SkLightingShader.h" |
+#include "SkMakeUnique.h" |
#include "SkMallocPixelRef.h" |
#include "SkNormalSource.h" |
#include "SkOSFile.h" |
@@ -370,13 +371,13 @@ static void TestPictureTypefaceSerialization(skiatest::Reporter* reporter) { |
{ |
// Load typeface as stream to create with axis settings. |
- SkAutoTDelete<SkStreamAsset> distortable(GetResourceAsStream("/fonts/Distortable.ttf")); |
+ std::unique_ptr<SkStreamAsset> distortable(GetResourceAsStream("/fonts/Distortable.ttf")); |
if (!distortable) { |
INFOF(reporter, "Could not run fontstream test because Distortable.ttf not found."); |
} else { |
SkFixed axis = SK_FixedSqrt2; |
sk_sp<SkTypeface> typeface(SkTypeface::MakeFromFontData( |
- new SkFontData(distortable.release(), 0, &axis, 1))); |
+ skstd::make_unique<SkFontData>(std::move(distortable), 0, &axis, 1))); |
if (!typeface) { |
INFOF(reporter, "Could not run fontstream test because Distortable.ttf not created."); |
} else { |