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

Side by Side Diff: src/animator/SkAnimator.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 unified diff | Download patch
« no previous file with comments | « src/animator/SkAnimateMaker.cpp ('k') | src/core/SkFontDescriptor.h » ('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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkAnimator.h" 10 #include "SkAnimator.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 { 75 {
76 fMaker->fFileName.reset(); 76 fMaker->fFileName.reset();
77 SkDisplayXMLParser parser(*fMaker); 77 SkDisplayXMLParser parser(*fMaker);
78 return parser.parse(dom, node); 78 return parser.parse(dom, node);
79 } 79 }
80 80
81 bool SkAnimator::decodeURI(const char uri[]) { 81 bool SkAnimator::decodeURI(const char uri[]) {
82 // SkDebugf("animator decode %s\n", uri); 82 // SkDebugf("animator decode %s\n", uri);
83 83
84 // SkStream* stream = SkStream::GetURIStream(fMaker->fPrefix.c_str(), uri); 84 // SkStream* stream = SkStream::GetURIStream(fMaker->fPrefix.c_str(), uri);
85 std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(uri); 85 SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(uri));
86 if (stream) { 86 if (stream.get()) {
87 this->setURIBase(uri); 87 this->setURIBase(uri);
88 return decodeStream(stream.get()); 88 return decodeStream(stream);
89 } else { 89 } else {
90 return false; 90 return false;
91 } 91 }
92 } 92 }
93 93
94 bool SkAnimator::doCharEvent(SkUnichar code) { 94 bool SkAnimator::doCharEvent(SkUnichar code) {
95 if (code == 0) 95 if (code == 0)
96 return false; 96 return false;
97 struct SkEventState state; 97 struct SkEventState state;
98 state.fCode = code; 98 state.fCode = code;
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 gUnitTests[i].fUnitTest(); 695 gUnitTests[i].fUnitTest();
696 SkDebugf("SkAnimator: End UnitTest for %s\n", gUnitTests[i].fTypeName); 696 SkDebugf("SkAnimator: End UnitTest for %s\n", gUnitTests[i].fTypeName);
697 } 697 }
698 } 698 }
699 #else 699 #else
700 void SkAnimator::Init(bool) {} 700 void SkAnimator::Init(bool) {}
701 #endif 701 #endif
702 702
703 void SkAnimator::Term() { 703 void SkAnimator::Term() {
704 } 704 }
OLDNEW
« no previous file with comments | « src/animator/SkAnimateMaker.cpp ('k') | src/core/SkFontDescriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698