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

Side by Side Diff: include/images/SkMovie.h

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 | « include/images/SkImageRef_GlobalPool.h ('k') | samplecode/SamplePicture.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 2008 The Android Open Source Project 3 * Copyright 2008 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 #ifndef SkMovie_DEFINED 10 #ifndef SkMovie_DEFINED
11 #define SkMovie_DEFINED 11 #define SkMovie_DEFINED
12 12
13 #include "SkRefCnt.h" 13 #include "SkRefCnt.h"
14 #include "SkCanvas.h" 14 #include "SkCanvas.h"
15 15
16 class SkStream; 16 class SkStreamRewindable;
17 17
18 class SkMovie : public SkRefCnt { 18 class SkMovie : public SkRefCnt {
19 public: 19 public:
20 SK_DECLARE_INST_COUNT(SkMovie) 20 SK_DECLARE_INST_COUNT(SkMovie)
21 21
22 /** Try to create a movie from the stream. If the stream format is not 22 /** Try to create a movie from the stream. If the stream format is not
23 supported, return NULL. 23 supported, return NULL.
24 */ 24 */
25 static SkMovie* DecodeStream(SkStream*); 25 static SkMovie* DecodeStream(SkStreamRewindable*);
26 /** Try to create a movie from the specified file path. If the file is not 26 /** Try to create a movie from the specified file path. If the file is not
27 found, or the format is not supported, return NULL. If a movie is 27 found, or the format is not supported, return NULL. If a movie is
28 returned, the stream may be retained by the movie (via ref()) until 28 returned, the stream may be retained by the movie (via ref()) until
29 the movie is finished with it (by calling unref()). 29 the movie is finished with it (by calling unref()).
30 */ 30 */
31 static SkMovie* DecodeFile(const char path[]); 31 static SkMovie* DecodeFile(const char path[]);
32 /** Try to create a movie from the specified memory. 32 /** Try to create a movie from the specified memory.
33 If the format is not supported, return NULL. If a movie is returned, 33 If the format is not supported, return NULL. If a movie is returned,
34 the data will have been read or copied, and so the caller may free 34 the data will have been read or copied, and so the caller may free
35 it. 35 it.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 SkMSec fCurrTime; 71 SkMSec fCurrTime;
72 SkBitmap fBitmap; 72 SkBitmap fBitmap;
73 bool fNeedBitmap; 73 bool fNeedBitmap;
74 74
75 void ensureInfo(); 75 void ensureInfo();
76 76
77 typedef SkRefCnt INHERITED; 77 typedef SkRefCnt INHERITED;
78 }; 78 };
79 79
80 #endif 80 #endif
OLDNEW
« no previous file with comments | « include/images/SkImageRef_GlobalPool.h ('k') | samplecode/SamplePicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698