Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: src/core/SkFlate.h

Issue 957323003: miniz support in SkFlate / PDF (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: -w Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/zlib.gyp ('k') | src/core/SkFlate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkFlate.h
diff --git a/src/core/SkFlate.h b/src/core/SkFlate.h
index 69dac018de6e93733a980cfc098b77a7ca5e1c2d..ac785af6e0ac9a7371ca24e893defe9e2e802612 100644
--- a/src/core/SkFlate.h
+++ b/src/core/SkFlate.h
@@ -14,9 +14,8 @@
#ifndef Sk_NO_FLATE
+#include "SkStream.h"
class SkData;
-class SkWStream;
-class SkStream;
/** \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 {
hal.canary 2015/02/26 19:26:25 /** * Wrap a stream in this class to compress the
mtklein 2015/02/26 19:32:51 Whoops, thank you. Done.
+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
« no previous file with comments | « gyp/zlib.gyp ('k') | src/core/SkFlate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698