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

Side by Side Diff: src/images/SkMovie.cpp

Issue 2339273002: SkFontData to use smart pointers. (Closed)
Patch Set: Add trivial bodies to the trivial implementations. 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 unified diff | Download patch
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | src/ports/SkFontConfigInterface_direct.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | src/ports/SkFontConfigInterface_direct.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698