OLD | NEW |
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 Loading... |
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 |
OLD | NEW |