| 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 #ifndef SkFlate_DEFINED | 10 #ifndef SkFlate_DEFINED |
| 11 #define SkFlate_DEFINED | 11 #define SkFlate_DEFINED |
| 12 | 12 |
| 13 #include "SkTypes.h" | 13 #include "SkTypes.h" |
| 14 | 14 |
| 15 #ifndef Sk_NO_FLATE |
| 16 |
| 15 class SkData; | 17 class SkData; |
| 16 class SkWStream; | 18 class SkWStream; |
| 17 class SkStream; | 19 class SkStream; |
| 18 | 20 |
| 19 /** \class SkFlate | 21 /** \class SkFlate |
| 20 A class to provide access to the flate compression algorithm. | 22 A class to provide access to the flate compression algorithm. |
| 21 */ | 23 */ |
| 22 class SkFlate { | 24 class SkFlate { |
| 23 public: | 25 public: |
| 24 /** Indicates if the flate algorithm is available. | |
| 25 */ | |
| 26 static bool HaveFlate(); | |
| 27 | |
| 28 /** | 26 /** |
| 29 * Use the flate compression algorithm to compress the data in src, | 27 * Use the flate compression algorithm to compress the data in src, |
| 30 * putting the result into dst. Returns false if an error occurs. | 28 * putting the result into dst. Returns false if an error occurs. |
| 31 */ | 29 */ |
| 32 static bool Deflate(SkStream* src, SkWStream* dst); | 30 static bool Deflate(SkStream* src, SkWStream* dst); |
| 33 | 31 |
| 34 /** | 32 /** |
| 35 * Use the flate compression algorithm to compress the data in src, | 33 * Use the flate compression algorithm to compress the data in src, |
| 36 * putting the result into dst. Returns false if an error occurs. | 34 * putting the result into dst. Returns false if an error occurs. |
| 37 */ | 35 */ |
| 38 static bool Deflate(const void* src, size_t len, SkWStream* dst); | 36 static bool Deflate(const void* src, size_t len, SkWStream* dst); |
| 39 | 37 |
| 40 /** | 38 /** |
| 41 * Use the flate compression algorithm to compress the data, | 39 * Use the flate compression algorithm to compress the data, |
| 42 * putting the result into dst. Returns false if an error occurs. | 40 * putting the result into dst. Returns false if an error occurs. |
| 43 */ | 41 */ |
| 44 static bool Deflate(const SkData*, SkWStream* dst); | 42 static bool Deflate(const SkData*, SkWStream* dst); |
| 45 | 43 |
| 46 /** Use the flate compression algorithm to decompress the data in src, | 44 /** Use the flate compression algorithm to decompress the data in src, |
| 47 putting the result into dst. Returns false if an error occurs. | 45 putting the result into dst. Returns false if an error occurs. |
| 48 */ | 46 */ |
| 49 static bool Inflate(SkStream* src, SkWStream* dst); | 47 static bool Inflate(SkStream* src, SkWStream* dst); |
| 50 }; | 48 }; |
| 51 | 49 |
| 52 #endif | 50 #endif // SK_NO_FLATE |
| 51 #endif // SkFlate_DEFINED |
| OLD | NEW |