aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/DeflateWStream.cpp
Commit message (Collapse)AuthorAge
* SkPDF: remove SK_NO_FLATE & dead code in SkPDFStreamGravatar halcanary2015-03-31
| | | | | | | | | | | | SkPDFStream copy constructor SkPDFStream Substitute mechanism SkPDFStream::setData(NULL); SkPDFStream SK_NO_FLATE logic BUG=skia:3585 TBR=bsalomon@google.com,reed@google.com Review URL: https://codereview.chromium.org/1041183002
* miniz support in SkFlate / PDFGravatar mtklein2015-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | - Adds miniz.c v115_r4 (latest release) to third_party. - Merges SkDeflateWStream into SkFlate so including "miniz.c" links without duplicating symbols. The only interesting code change I've made is to remove the line fImpl->fZStream.data_type = Z_BINARY; from SkDeflateWStream::SkDeflateWStream(). miniz doesn't have Z_BINARY defined, and as far as I can tell, both zlib and miniz ignore data_type. We should be able to swap skflate.gyp's dependency between zlib.gyp:zlib and zlib.gyp:miniz at will (except of course on Windows) if we're interested in zlib itself. I've left android framework on its own zlib. I think this all means we can stop defining SK_NO_FLATE on Windows. I'll leave the possible cleanup of SK_NO_FLATE itself for another time. Might be we always want to keep this dependency optional. CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-ShuttleA-HD7770-x86-Debug-Trybot BUG=skia: Review URL: https://codereview.chromium.org/957323003
* PDF: Add (low-memory) SkPDFBitmap classGravatar halcanary2015-02-18
Also: Add SkDeflateWStream and associated unit tests. SkPDFBitmap is a replacement for SkPDFImage. As of now, it only supports 8888 bitmaps (the most common case). SkPDFBitmap takes very little extra memory (aside from refing the bitmap's pixels), and its emitObject() does not cache any data. The SkPDFBitmap::Create function will check the canon for duplicates. This can reduce the size of the output PDF. Motivation: this gives another ~40% decrease in PDF memory overhead TODO: Support other ColorTypes and scrap SkPDFImage. BUG=skia:3030 Review URL: https://codereview.chromium.org/918813002