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 |
(...skipping 23 matching lines...) Expand all Loading... |
34 /** Create a PDF stream. A Length entry is automatically added to the | 34 /** Create a PDF stream. A Length entry is automatically added to the |
35 * stream dictionary. | 35 * stream dictionary. |
36 * @param stream The data part of the stream. Will be duplicate()d. | 36 * @param stream The data part of the stream. Will be duplicate()d. |
37 */ | 37 */ |
38 explicit SkPDFStream(SkStream* stream); | 38 explicit SkPDFStream(SkStream* stream); |
39 | 39 |
40 virtual ~SkPDFStream(); | 40 virtual ~SkPDFStream(); |
41 | 41 |
42 // The SkPDFObject interface. These two methods use a mutex to | 42 // The SkPDFObject interface. These two methods use a mutex to |
43 // allow multiple threads to call at the same time. | 43 // allow multiple threads to call at the same time. |
44 virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog, | 44 virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRID
E; |
45 bool indirect); | |
46 virtual size_t getOutputSize(SkPDFCatalog* catalog, bool indirect); | 45 virtual size_t getOutputSize(SkPDFCatalog* catalog, bool indirect); |
47 | 46 |
48 protected: | 47 protected: |
49 enum State { | 48 enum State { |
50 kUnused_State, //!< The stream hasn't been requested yet. | 49 kUnused_State, //!< The stream hasn't been requested yet. |
51 kNoCompression_State, //!< The stream's been requested in an | 50 kNoCompression_State, //!< The stream's been requested in an |
52 // uncompressed form. | 51 // uncompressed form. |
53 kCompressed_State, //!< The stream's already been compressed. | 52 kCompressed_State, //!< The stream's already been compressed. |
54 }; | 53 }; |
55 | 54 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 SkMemoryStream fMemoryStream; // Used by fDataStream when | 97 SkMemoryStream fMemoryStream; // Used by fDataStream when |
99 // fDataStream needs to be backed | 98 // fDataStream needs to be backed |
100 // by SkData. | 99 // by SkData. |
101 SkAutoTUnref<SkStreamRewindable> fDataStream; | 100 SkAutoTUnref<SkStreamRewindable> fDataStream; |
102 SkAutoTUnref<SkPDFStream> fSubstitute; | 101 SkAutoTUnref<SkPDFStream> fSubstitute; |
103 | 102 |
104 typedef SkPDFDict INHERITED; | 103 typedef SkPDFDict INHERITED; |
105 }; | 104 }; |
106 | 105 |
107 #endif | 106 #endif |
OLD | NEW |