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

Side by Side Diff: src/core/SkFlate.cpp

Issue 933523007: zlib/pdf: remove HaveFlate(), depend on preprocessor defines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-02-17 (Tuesday) 17:35:15 EST 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 unified diff | Download patch
« no previous file with comments | « src/core/SkFlate.h ('k') | src/pdf/SkPDFImage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifdef SK_NO_FLATE 14 #ifndef SK_NO_FLATE
15 bool SkFlate::HaveFlate() { return false; }
16 bool SkFlate::Deflate(SkStream*, SkWStream*) { return false; }
17 bool SkFlate::Deflate(const void*, size_t, SkWStream*) { return false; }
18 bool SkFlate::Deflate(const SkData*, SkWStream*) { return false; }
19 bool SkFlate::Inflate(SkStream*, SkWStream*) { return false; }
20 #else
21
22 // static
23 bool SkFlate::HaveFlate() {
24 return true;
25 }
26 15
27 namespace { 16 namespace {
28 17
29 #include "zlib.h" 18 #include "zlib.h"
30 19
31 // static 20 // static
32 const size_t kBufferSize = 1024; 21 const size_t kBufferSize = 1024;
33 22
34 bool doFlate(bool compress, SkStream* src, SkWStream* dst) { 23 bool doFlate(bool compress, SkStream* src, SkWStream* dst) {
35 uint8_t inputBuffer[kBufferSize]; 24 uint8_t inputBuffer[kBufferSize];
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return doFlate(true, &stream, dst); 115 return doFlate(true, &stream, dst);
127 } 116 }
128 return false; 117 return false;
129 } 118 }
130 119
131 // static 120 // static
132 bool SkFlate::Inflate(SkStream* src, SkWStream* dst) { 121 bool SkFlate::Inflate(SkStream* src, SkWStream* dst) {
133 return doFlate(false, src, dst); 122 return doFlate(false, src, dst);
134 } 123 }
135 124
136 #endif 125 #endif // SK_NO_FLATE
126
OLDNEW
« no previous file with comments | « src/core/SkFlate.h ('k') | src/pdf/SkPDFImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698