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

Unified Diff: src/animator/SkAnimateMaker.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 | « samplecode/SampleAnimator.cpp ('k') | src/animator/SkAnimator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkAnimateMaker.cpp
diff --git a/src/animator/SkAnimateMaker.cpp b/src/animator/SkAnimateMaker.cpp
index 066f877a9b50e9dcce864a3b5e6a302dfc2b92bf..5186da04d814ef4c2c876589385611c8efc066a9 100644
--- a/src/animator/SkAnimateMaker.cpp
+++ b/src/animator/SkAnimateMaker.cpp
@@ -99,9 +99,9 @@
// SkDebugf("animator decode %s\n", uri);
// SkStream* stream = SkStream::GetURIStream(fPrefix.c_str(), uri);
- std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(uri);
- if (stream) {
- bool success = decodeStream(stream.get());
+ SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(uri));
+ if (stream.get()) {
+ bool success = decodeStream(stream);
if (hasError() && fError.hasNoun() == false)
fError.setNoun(uri);
return success;
« no previous file with comments | « samplecode/SampleAnimator.cpp ('k') | src/animator/SkAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698