OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
3 * | 3 * |
4 * 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 |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "SkData.h" | 9 #include "SkData.h" |
10 #include "SkDeflate.h" | 10 #include "SkDeflate.h" |
11 #include "SkPDFStream.h" | 11 #include "SkPDFStream.h" |
12 #include "SkStream.h" | |
13 #include "SkStreamPriv.h" | 12 #include "SkStreamPriv.h" |
14 | 13 |
15 SkPDFStream::~SkPDFStream() {} | 14 SkPDFStream::~SkPDFStream() {} |
16 | 15 |
17 void SkPDFStream::drop() { | 16 void SkPDFStream::drop() { |
18 fCompressedData.reset(nullptr); | 17 fCompressedData.reset(nullptr); |
19 this->SkPDFDict::drop(); | 18 this->SkPDFDict::drop(); |
20 } | 19 } |
21 | 20 |
22 void SkPDFStream::emitObject(SkWStream* stream, | 21 void SkPDFStream::emitObject(SkWStream* stream, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 dup->getLength() <= length + strlen("/Filter_/FlateDecode_")) { | 59 dup->getLength() <= length + strlen("/Filter_/FlateDecode_")) { |
61 this->insertInt("Length", dup->getLength()); | 60 this->insertInt("Length", dup->getLength()); |
62 fCompressedData.reset(dup.release()); | 61 fCompressedData.reset(dup.release()); |
63 return; | 62 return; |
64 } | 63 } |
65 } | 64 } |
66 fCompressedData.reset(compressedData.detachAsStream()); | 65 fCompressedData.reset(compressedData.detachAsStream()); |
67 this->insertName("Filter", "FlateDecode"); | 66 this->insertName("Filter", "FlateDecode"); |
68 this->insertInt("Length", length); | 67 this->insertInt("Length", length); |
69 } | 68 } |
OLD | NEW |