Make SkFlate buffers statically sized (fixes Windows compile).
Review URL: http://codereview.appspot.com/4357054
git-svn-id: http://skia.googlecode.com/svn/trunk@1059 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkFlate.cpp b/src/core/SkFlate.cpp
index 9859613..99b331e 100644
--- a/src/core/SkFlate.cpp
+++ b/src/core/SkFlate.cpp
@@ -24,9 +24,6 @@
#else
// static
-const size_t SkFlate::kBufferSize = 1024;
-
-// static
bool SkFlate::HaveFlate() {
#ifdef SK_DEBUG
return false;
@@ -39,8 +36,10 @@
#include SK_ZLIB_INCLUDE
-bool doFlate(bool compress, const size_t kBufferSize, SkStream* src,
- SkDynamicMemoryWStream* dst) {
+// static
+const size_t kBufferSize = 1024;
+
+bool doFlate(bool compress, SkStream* src, SkDynamicMemoryWStream* dst) {
uint8_t inputBuffer[kBufferSize];
uint8_t outputBuffer[kBufferSize];
z_stream flateData;
@@ -121,12 +120,12 @@
// static
bool SkFlate::Deflate(SkStream* src, SkDynamicMemoryWStream* dst) {
- return doFlate(true, kBufferSize, src, dst);
+ return doFlate(true, src, dst);
}
// static
bool SkFlate::Inflate(SkStream* src, SkDynamicMemoryWStream* dst) {
- return doFlate(false, kBufferSize, src, dst);
+ return doFlate(false, src, dst);
}
#endif