| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 The Android Open Source Project | 3 * Copyright 2010 The Android Open Source Project |
| 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 "SkFlate.h" |
| 12 #include "SkStream.h" | 12 #include "SkStream.h" |
| 13 | 13 |
| 14 #ifndef SK_NO_FLATE | |
| 15 | |
| 16 namespace { | 14 namespace { |
| 17 | 15 |
| 18 #ifdef ZLIB_INCLUDE | 16 #ifdef ZLIB_INCLUDE |
| 19 #include ZLIB_INCLUDE | 17 #include ZLIB_INCLUDE |
| 20 #else | 18 #else |
| 21 #include "zlib.h" | 19 #include "zlib.h" |
| 22 #endif | 20 #endif |
| 23 | 21 |
| 24 // static | 22 // static |
| 25 const size_t kBufferSize = 1024; | 23 const size_t kBufferSize = 1024; |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 fImpl->fInBuffer, fImpl->fInBufferIndex); | 216 fImpl->fInBuffer, fImpl->fInBufferIndex); |
| 219 fImpl->fInBufferIndex = 0; | 217 fImpl->fInBufferIndex = 0; |
| 220 } | 218 } |
| 221 } | 219 } |
| 222 return true; | 220 return true; |
| 223 } | 221 } |
| 224 | 222 |
| 225 size_t SkDeflateWStream::bytesWritten() const { | 223 size_t SkDeflateWStream::bytesWritten() const { |
| 226 return fImpl->fZStream.total_in + fImpl->fInBufferIndex; | 224 return fImpl->fZStream.total_in + fImpl->fInBufferIndex; |
| 227 } | 225 } |
| 228 | |
| 229 | |
| 230 #endif // SK_NO_FLATE | |
| 231 | |
| OLD | NEW |