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

Side by Side Diff: src/animator/SkAnimator.cpp

Issue 849103004: Make SkStream *not* ref counted. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase, just in case. Created 5 years, 11 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/animator/SkDrawBitmap.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 /* 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 { 77 {
78 fMaker->fFileName.reset(); 78 fMaker->fFileName.reset();
79 SkDisplayXMLParser parser(*fMaker); 79 SkDisplayXMLParser parser(*fMaker);
80 return parser.parse(dom, node); 80 return parser.parse(dom, node);
81 } 81 }
82 82
83 bool SkAnimator::decodeURI(const char uri[]) { 83 bool SkAnimator::decodeURI(const char uri[]) {
84 // SkDebugf("animator decode %s\n", uri); 84 // SkDebugf("animator decode %s\n", uri);
85 85
86 // SkStream* stream = SkStream::GetURIStream(fMaker->fPrefix.c_str(), uri); 86 // SkStream* stream = SkStream::GetURIStream(fMaker->fPrefix.c_str(), uri);
87 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(uri)); 87 SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(uri));
88 if (stream.get()) { 88 if (stream.get()) {
89 this->setURIBase(uri); 89 this->setURIBase(uri);
90 return decodeStream(stream); 90 return decodeStream(stream);
91 } else { 91 } else {
92 return false; 92 return false;
93 } 93 }
94 } 94 }
95 95
96 bool SkAnimator::doCharEvent(SkUnichar code) { 96 bool SkAnimator::doCharEvent(SkUnichar code) {
97 if (code == 0) 97 if (code == 0)
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 gUnitTests[i].fUnitTest(); 697 gUnitTests[i].fUnitTest();
698 SkDebugf("SkAnimator: End UnitTest for %s\n", gUnitTests[i].fTypeName); 698 SkDebugf("SkAnimator: End UnitTest for %s\n", gUnitTests[i].fTypeName);
699 } 699 }
700 } 700 }
701 #else 701 #else
702 void SkAnimator::Init(bool) {} 702 void SkAnimator::Init(bool) {}
703 #endif 703 #endif
704 704
705 void SkAnimator::Term() { 705 void SkAnimator::Term() {
706 } 706 }
OLDNEW
« no previous file with comments | « src/animator/SkAnimateMaker.cpp ('k') | src/animator/SkDrawBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698