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

Unified Diff: tests/SerializationTest.cpp

Issue 2343933002: Revert of SkFontData to use smart pointers. (Closed)
Patch Set: Created 4 years, 3 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 | « tests/ExifTest.cpp ('k') | tests/YUVTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SerializationTest.cpp
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index bc2770ebda0d0a9e0143a408bf115e2ceb2f7bc8..ff9b342074adc1d7d8b5d54d4c7364077cda633b 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -13,7 +13,6 @@
#include "SkImage.h"
#include "SkImageSource.h"
#include "SkLightingShader.h"
-#include "SkMakeUnique.h"
#include "SkMallocPixelRef.h"
#include "SkNormalSource.h"
#include "SkOSFile.h"
@@ -371,13 +370,13 @@
{
// Load typeface as stream to create with axis settings.
- std::unique_ptr<SkStreamAsset> distortable(GetResourceAsStream("/fonts/Distortable.ttf"));
+ SkAutoTDelete<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(
- skstd::make_unique<SkFontData>(std::move(distortable), 0, &axis, 1)));
+ new SkFontData(distortable.release(), 0, &axis, 1)));
if (!typeface) {
INFOF(reporter, "Could not run fontstream test because Distortable.ttf not created.");
} else {
« no previous file with comments | « tests/ExifTest.cpp ('k') | tests/YUVTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698