| 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 21 matching lines...) Expand all Loading... |
| 32 explicit SkPDFStream(SkData* data); | 32 explicit SkPDFStream(SkData* data); |
| 33 | 33 |
| 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. This two method uses 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) SK_OVERRID
E; | 44 virtual void emitObject(SkWStream* stream, SkPDFCatalog* catalog) SK_OVERRID
E; |
| 45 virtual size_t getOutputSize(SkPDFCatalog* catalog, bool indirect); | |
| 46 | 45 |
| 47 protected: | 46 protected: |
| 48 enum State { | 47 enum State { |
| 49 kUnused_State, //!< The stream hasn't been requested yet. | 48 kUnused_State, //!< The stream hasn't been requested yet. |
| 50 kNoCompression_State, //!< The stream's been requested in an | 49 kNoCompression_State, //!< The stream's been requested in an |
| 51 // uncompressed form. | 50 // uncompressed form. |
| 52 kCompressed_State, //!< The stream's already been compressed. | 51 kCompressed_State, //!< The stream's already been compressed. |
| 53 }; | 52 }; |
| 54 | 53 |
| 55 /** Create a PDF stream with the same content and dictionary entries | 54 /** Create a PDF stream with the same content and dictionary entries |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 SkMemoryStream fMemoryStream; // Used by fDataStream when | 96 SkMemoryStream fMemoryStream; // Used by fDataStream when |
| 98 // fDataStream needs to be backed | 97 // fDataStream needs to be backed |
| 99 // by SkData. | 98 // by SkData. |
| 100 SkAutoTUnref<SkStreamRewindable> fDataStream; | 99 SkAutoTUnref<SkStreamRewindable> fDataStream; |
| 101 SkAutoTUnref<SkPDFStream> fSubstitute; | 100 SkAutoTUnref<SkPDFStream> fSubstitute; |
| 102 | 101 |
| 103 typedef SkPDFDict INHERITED; | 102 typedef SkPDFDict INHERITED; |
| 104 }; | 103 }; |
| 105 | 104 |
| 106 #endif | 105 #endif |
| OLD | NEW |