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

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

Issue 23477009: Change SkImageDecoders to take an SkStreamRewindable. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Only switch to SkStreamRewindable when necessary. Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « samplecode/SamplePicture.cpp ('k') | src/images/SkImageDecoder.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 "SkDrawBitmap.h" 10 #include "SkDrawBitmap.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 if (base64.fData) { 182 if (base64.fData) {
183 fBitmap.reset(); 183 fBitmap.reset();
184 SkImageDecoder::DecodeMemory(base64.fData, base64.fLength, &fBitmap); 184 SkImageDecoder::DecodeMemory(base64.fData, base64.fLength, &fBitmap);
185 } else if (src.size()) { 185 } else if (src.size()) {
186 if (fLast.equals(src)) 186 if (fLast.equals(src))
187 return; 187 return;
188 fLast.set(src); 188 fLast.set(src);
189 fBitmap.reset(); 189 fBitmap.reset();
190 190
191 //SkStream* stream = SkStream::GetURIStream(fUriBase, src.c_str()); 191 //SkStream* stream = SkStream::GetURIStream(fUriBase, src.c_str());
192 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(src.c_str())); 192 SkAutoTUnref<SkStreamAsset> stream(SkStream::NewFromFile(src.c_str()));
193 if (stream.get()) { 193 if (stream.get()) {
194 SkImageDecoder::DecodeStream(stream, &fBitmap); 194 SkImageDecoder::DecodeStream(stream, &fBitmap);
195 } 195 }
196 } 196 }
197 } 197 }
OLDNEW
« no previous file with comments | « samplecode/SamplePicture.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698