| Index: samplecode/SampleAnimator.cpp
|
| diff --git a/samplecode/SampleAnimator.cpp b/samplecode/SampleAnimator.cpp
|
| index d4a4cdd2887f150c405310f742b67f65c9ec494e..a3ec83afe673968e45d09a91824eb8552e8ce1de 100644
|
| --- a/samplecode/SampleAnimator.cpp
|
| +++ b/samplecode/SampleAnimator.cpp
|
| @@ -12,6 +12,8 @@
|
| #include "SkStream.h"
|
| #include "SkDOM.h"
|
|
|
| +#include <memory>
|
| +
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| class SkAnimatorView : public SkView {
|
| @@ -50,8 +52,8 @@ void SkAnimatorView::setURIBase(const char dir[]) {
|
| }
|
|
|
| bool SkAnimatorView::decodeFile(const char path[]) {
|
| - SkAutoTDelete<SkStream> is(SkStream::NewFromFile(path));
|
| - return is.get() != nullptr && this->decodeStream(is);
|
| + std::unique_ptr<SkStream> is = SkStream::MakeFromFile(path);
|
| + return is && this->decodeStream(is.get());
|
| }
|
|
|
| bool SkAnimatorView::decodeMemory(const void* buffer, size_t size) {
|
|
|