| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #include "SkMovie.h" | 7 #include "SkMovie.h" |
| 8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 9 #include "SkPaint.h" | 9 #include "SkPaint.h" |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 //////////////////////////////////////////////////////////////////// | 82 //////////////////////////////////////////////////////////////////// |
| 83 | 83 |
| 84 #include "SkStream.h" | 84 #include "SkStream.h" |
| 85 | 85 |
| 86 SkMovie* SkMovie::DecodeMemory(const void* data, size_t length) { | 86 SkMovie* SkMovie::DecodeMemory(const void* data, size_t length) { |
| 87 SkMemoryStream stream(data, length, false); | 87 SkMemoryStream stream(data, length, false); |
| 88 return SkMovie::DecodeStream(&stream); | 88 return SkMovie::DecodeStream(&stream); |
| 89 } | 89 } |
| 90 | 90 |
| 91 SkMovie* SkMovie::DecodeFile(const char path[]) { | 91 SkMovie* SkMovie::DecodeFile(const char path[]) { |
| 92 SkAutoTDelete<SkStreamRewindable> stream(SkStream::NewFromFile(path)); | 92 std::unique_ptr<SkStreamRewindable> stream = SkStream::MakeFromFile(path); |
| 93 return stream.get() ? SkMovie::DecodeStream(stream) : nullptr; | 93 return stream ? SkMovie::DecodeStream(stream.get()) : nullptr; |
| 94 } | 94 } |
| OLD | NEW |