| OLD | NEW |
| 1 | |
| 2 /* | 1 /* |
| 3 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
| 4 * | 3 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 7 */ | 6 */ |
| 8 | 7 |
| 9 | 8 |
| 10 #ifndef SkPDFStream_DEFINED | 9 #ifndef SkPDFStream_DEFINED |
| 11 #define SkPDFStream_DEFINED | 10 #define SkPDFStream_DEFINED |
| 12 | 11 |
| 13 #include "SkPDFTypes.h" | 12 #include "SkPDFTypes.h" |
| 14 #include "SkRefCnt.h" | 13 #include "SkRefCnt.h" |
| 15 #include "SkStream.h" | 14 #include "SkStream.h" |
| 16 #include "SkTemplates.h" | 15 #include "SkTemplates.h" |
| 17 | 16 |
| 18 class SkPDFObjNumMap; | 17 class SkPDFObjNumMap; |
| 19 | 18 |
| 20 /** \class SkPDFStream | 19 /** \class SkPDFStream |
| 21 | 20 |
| 22 A stream object in a PDF. Note, all streams must be indirect objects (via | 21 A stream object in a PDF. Note, all streams must be indirect objects (via |
| 23 SkObjRef). | 22 SkObjRef). |
| 24 */ | 23 */ |
| 25 class SkPDFStream : public SkPDFDict { | 24 class SkPDFStream : public SkPDFDict { |
| 26 | 25 |
| 27 public: | 26 public: |
| 28 /** Create a PDF stream. A Length entry is automatically added to the | 27 /** Create a PDF stream. A Length entry is automatically added to the |
| 29 * stream dictionary. | 28 * stream dictionary. |
| 30 * @param data The data part of the stream. Will not take ownership. | 29 * @param data The data part of the stream. Will not take ownership. |
| 31 */ | 30 */ |
| 32 explicit SkPDFStream(SkData* data) { this->setData(data); } | 31 explicit SkPDFStream(SkData* data) { this->setData(data); } |
| 33 | 32 |
| 34 /** Create a PDF stream. A Length entry is automatically added to the | 33 /** Create a PDF stream. A Length entry is automatically added to the |
| 35 * stream dictionary. | 34 * stream dictionary. |
| 36 * @param stream The data part of the stream. Will not take ownership. | 35 * @param stream The data part of the stream. Will not take ownership. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 58 this->setData(&memoryStream); | 57 this->setData(&memoryStream); |
| 59 } | 58 } |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 std::unique_ptr<SkStreamRewindable> fCompressedData; | 61 std::unique_ptr<SkStreamRewindable> fCompressedData; |
| 63 | 62 |
| 64 typedef SkPDFDict INHERITED; | 63 typedef SkPDFDict INHERITED; |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 #endif | 66 #endif |
| OLD | NEW |