Review URL: https://codereview.appspot.com/5991067

git-svn-id: http://skia.googlecode.com/svn/trunk@3699 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
justinlin@google.com 2012-04-16 19:10:21 +00:00
Родитель 1e945b7e70
Коммит fffb2f1bda
3 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -121,9 +121,11 @@
/* If zlib is available and you want to support the flate compression
algorithm (used in PDF generation), define SK_ZLIB_INCLUDE to be the
include path.
include path. Alternatively, define SK_SYSTEM_ZLIB to use the system zlib
library specified as "#include <zlib.h>".
*/
//#define SK_ZLIB_INCLUDE <zlib.h>
//#define SK_SYSTEM_ZLIB
/* Define this to allow PDF scalars above 32k. The PDF/A spec doesn't allow
them, but modern PDF interpreters should handle them just fine.

Просмотреть файл

@ -82,6 +82,12 @@
#endif
#endif
#if defined(SK_ZLIB_INCLUDE) && defined(SK_SYSTEM_ZLIB)
#error "cannot define both SK_ZLIB_INCLUDE and SK_SYSTEM_ZLIB"
#elif defined(SK_ZLIB_INCLUDE) || defined(SK_SYSTEM_ZLIB)
#define SK_HAS_ZLIB
#endif
///////////////////////////////////////////////////////////////////////////////
#ifndef SkNEW

Просмотреть файл

@ -11,7 +11,7 @@
#include "SkFlate.h"
#include "SkStream.h"
#ifndef SK_ZLIB_INCLUDE
#ifndef SK_HAS_ZLIB
bool SkFlate::HaveFlate() { return false; }
bool SkFlate::Deflate(SkStream*, SkWStream*) { return false; }
bool SkFlate::Deflate(const void*, size_t, SkWStream*) { return false; }
@ -26,7 +26,11 @@ bool SkFlate::HaveFlate() {
namespace {
#ifdef SK_SYSTEM_ZLIB
#include <zlib.h>
#else
#include SK_ZLIB_INCLUDE
#endif
// static
const size_t kBufferSize = 1024;