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 #include "SkData.h" | 10 #include "SkData.h" |
11 #include "SkFlate.h" | 11 #include "SkDeflate.h" |
12 #include "SkPDFStream.h" | 12 #include "SkPDFStream.h" |
13 #include "SkStream.h" | 13 #include "SkStream.h" |
14 #include "SkStreamPriv.h" | 14 #include "SkStreamPriv.h" |
15 | 15 |
16 SkPDFStream::SkPDFStream(SkStream* stream) : fState(kUnused_State) { | 16 SkPDFStream::SkPDFStream(SkStream* stream) : fState(kUnused_State) { |
17 this->setData(stream); | 17 this->setData(stream); |
18 } | 18 } |
19 | 19 |
20 SkPDFStream::SkPDFStream(SkData* data) : fState(kUnused_State) { | 20 SkPDFStream::SkPDFStream(SkData* data) : fState(kUnused_State) { |
21 this->setData(data); | 21 this->setData(data); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Code assumes that the stream starts at the beginning and is rewindable. | 61 // Code assumes that the stream starts at the beginning and is rewindable. |
62 // SkStreamRewindableFromSkStream will try stream->duplicate(). | 62 // SkStreamRewindableFromSkStream will try stream->duplicate(). |
63 fDataStream.reset(SkStreamRewindableFromSkStream(stream)); | 63 fDataStream.reset(SkStreamRewindableFromSkStream(stream)); |
64 SkASSERT(fDataStream.get()); | 64 SkASSERT(fDataStream.get()); |
65 } | 65 } |
66 | 66 |
67 size_t SkPDFStream::dataSize() const { | 67 size_t SkPDFStream::dataSize() const { |
68 SkASSERT(fDataStream->hasLength()); | 68 SkASSERT(fDataStream->hasLength()); |
69 return fDataStream->getLength(); | 69 return fDataStream->getLength(); |
70 } | 70 } |
OLD | NEW |