Index: src/core/SkFlate.h |
diff --git a/src/core/SkFlate.h b/src/core/SkFlate.h |
index 69dac018de6e93733a980cfc098b77a7ca5e1c2d..a0dc391a9c2bc4e964594f1a1cc73b39bed6e08b 100644 |
--- a/src/core/SkFlate.h |
+++ b/src/core/SkFlate.h |
@@ -15,8 +15,7 @@ |
#ifndef Sk_NO_FLATE |
class SkData; |
-class SkWStream; |
-class SkStream; |
+#include "SkStream.h" |
scroggo
2015/02/26 17:56:53
nit: Don't we typically place includes above class
mtklein
2015/02/26 18:00:16
I guess 'c' does come after '#'...
|
/** \class SkFlate |
A class to provide access to the flate compression algorithm. |
@@ -47,5 +46,26 @@ public: |
static bool Inflate(SkStream* src, SkWStream* dst); |
}; |
+class SkDeflateWStream : public SkWStream { |
+public: |
+ /** Does not take ownership of the stream. */ |
+ SkDeflateWStream(SkWStream*); |
+ |
+ /** The destructor calls finalize(). */ |
+ ~SkDeflateWStream(); |
+ |
+ /** Write the end of the compressed stream. All subsequent calls to |
+ write() will fail. Subsequent calls to finalize() do nothing. */ |
+ void finalize(); |
+ |
+ // The SkWStream interface: |
+ bool write(const void*, size_t) SK_OVERRIDE; |
+ size_t bytesWritten() const SK_OVERRIDE; |
+ |
+private: |
+ struct Impl; |
+ SkAutoTDelete<Impl> fImpl; |
+}; |
+ |
#endif // SK_NO_FLATE |
#endif // SkFlate_DEFINED |