OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
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 SkPDFStream_DEFINED | 10 #ifndef SkPDFStream_DEFINED |
11 #define SkPDFStream_DEFINED | 11 #define SkPDFStream_DEFINED |
12 | 12 |
13 #include "SkPDFTypes.h" | 13 #include "SkPDFTypes.h" |
14 #include "SkRefCnt.h" | 14 #include "SkRefCnt.h" |
15 #include "SkStream.h" | 15 #include "SkStream.h" |
16 #include "SkTemplates.h" | 16 #include "SkTemplates.h" |
17 | 17 |
18 class SkPDFCatalog; | 18 class SkPDFCatalog; |
19 | 19 |
20 /** \class SkPDFStream | 20 /** \class SkPDFStream |
21 | 21 |
22 A stream object in a PDF. Note, all streams must be indirect objects (via | 22 A stream object in a PDF. Note, all streams must be indirect objects (via |
23 SkObjRef). | 23 SkObjRef). |
24 TODO(vandebo): SkStream should be replaced by SkStreamRewindable when that | 24 TODO(vandebo): SkStream should be replaced by SkStreamRewindable when that |
25 is feasible. | 25 is feasible. |
26 */ | 26 */ |
27 class SkPDFStream : public SkPDFDict { | 27 class SkPDFStream : public SkPDFDict { |
| 28 SK_DECLARE_INST_COUNT(SkPDFStream) |
28 public: | 29 public: |
29 /** Create a PDF stream. A Length entry is automatically added to the | 30 /** Create a PDF stream. A Length entry is automatically added to the |
30 * stream dictionary. The stream may be retained (stream->ref() may be | 31 * stream dictionary. The stream may be retained (stream->ref() may be |
31 * called) so its contents must not be changed after calling this. | 32 * called) so its contents must not be changed after calling this. |
32 * @param data The data part of the stream. | 33 * @param data The data part of the stream. |
33 */ | 34 */ |
34 explicit SkPDFStream(SkData* data); | 35 explicit SkPDFStream(SkData* data); |
35 /** Deprecated constructor. */ | 36 /** Deprecated constructor. */ |
36 explicit SkPDFStream(SkStream* stream); | 37 explicit SkPDFStream(SkStream* stream); |
37 /** Create a PDF stream with the same content and dictionary entries | 38 /** Create a PDF stream with the same content and dictionary entries |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 State fState; | 91 State fState; |
91 | 92 |
92 // TODO(vandebo): Use SkData (after removing deprecated constructor). | 93 // TODO(vandebo): Use SkData (after removing deprecated constructor). |
93 SkAutoTUnref<SkStream> fData; | 94 SkAutoTUnref<SkStream> fData; |
94 SkAutoTUnref<SkPDFStream> fSubstitute; | 95 SkAutoTUnref<SkPDFStream> fSubstitute; |
95 | 96 |
96 typedef SkPDFDict INHERITED; | 97 typedef SkPDFDict INHERITED; |
97 }; | 98 }; |
98 | 99 |
99 #endif | 100 #endif |
OLD | NEW |