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

Issue 918813002: PDF: Add (low-memory) SkPDFBitmap class (Closed)

Created:
5 years, 10 months ago by hal.canary
Modified:
5 years, 10 months ago
Reviewers:
mtklein
CC:
reviews_skia.org, djsollen
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

PDF: Add (low-memory) SkPDFBitmap class 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 Committed: https://skia.googlesource.com/skia/+/1b5c604d9d344537941b11b136348edfc39f236c

Patch Set 1 : 2015-02-11 (Wednesday) 18:49:13 EST #

Total comments: 33

Patch Set 2 : 2015-02-12 (Thursday) 16:27:28 EST #

Total comments: 1

Patch Set 3 : 2015-02-12 (Thursday) 17:09:37 EST #

Patch Set 4 : 2015-02-12 (Thursday) 18:22:02 EST #

Patch Set 5 : 2015-02-13 (Friday) 13:22:18 EST #

Patch Set 6 : 2015-02-13 (Friday) 13:26:10 EST #

Patch Set 7 : 2015-02-13 (Friday) 14:22:01 EST #

Patch Set 8 : 2015-02-13 (Friday) 16:58:40 EST #

Patch Set 9 : rebase on SK_NO_ZLIB #

Patch Set 10 : fix win compile, improve trivial compression, fix gm/bitmappremul #

Patch Set 11 : mutable bitmaps get copied #

Unified diffs Side-by-side diffs Delta from patch set Stats (+676 lines, -101 lines) Patch
A gm/repeated_bitmap.cpp View 1 1 chunk +31 lines, -0 lines 0 comments Download
M gyp/gmslides.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M gyp/pdf.gypi View 2 chunks +4 lines, -0 lines 0 comments Download
M gyp/tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M site/dev/contrib/style.md View 1 1 chunk +1 line, -0 lines 0 comments Download
A src/pdf/SkDeflateWStream.h View 1 2 3 4 5 6 7 8 9 1 chunk +45 lines, -0 lines 0 comments Download
A src/pdf/SkDeflateWStream.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +106 lines, -0 lines 0 comments Download
A src/pdf/SkPDFBitmap.h View 1 2 1 chunk +45 lines, -0 lines 0 comments Download
A src/pdf/SkPDFBitmap.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +333 lines, -0 lines 0 comments Download
M src/pdf/SkPDFCanon.h View 4 chunks +9 lines, -0 lines 0 comments Download
M src/pdf/SkPDFCanon.cpp View 3 chunks +20 lines, -0 lines 0 comments Download
M src/pdf/SkPDFImage.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
A tests/DeflateWStream.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +76 lines, -0 lines 0 comments Download
M tests/PDFPrimitivesTest.cpp View 1 2 3 4 5 6 7 8 4 chunks +0 lines, -101 lines 0 comments Download

Messages

Total messages: 54 (30 generated)
hal.canary
ptal
5 years, 10 months ago (2015-02-11 23:50:08 UTC) #4
mtklein
> Motivation: this gives another ~40% decrease in PDF memory overhead Holy cow. Way to ...
5 years, 10 months ago (2015-02-11 23:51:01 UTC) #5
hal.canary
On 2015/02/11 23:51:01, mtklein wrote: > > Motivation: this gives another ~40% decrease in PDF ...
5 years, 10 months ago (2015-02-11 23:59:30 UTC) #6
mtklein
I have only nits. Totally on board with the general plan. I don't even want ...
5 years, 10 months ago (2015-02-12 00:21:47 UTC) #7
hal.canary
https://codereview.chromium.org/918813002/diff/40001/src/pdf/SkDeflateWStream.cpp File src/pdf/SkDeflateWStream.cpp (right): https://codereview.chromium.org/918813002/diff/40001/src/pdf/SkDeflateWStream.cpp#newcode17 src/pdf/SkDeflateWStream.cpp:17: On 2015/02/12 00:21:45, mtklein wrote: > Don't we need ...
5 years, 10 months ago (2015-02-12 21:28:04 UTC) #8
mtklein
lgtm Please consider testing whether it's really worth the added code complexity to do the ...
5 years, 10 months ago (2015-02-12 21:46:01 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/80001
5 years, 10 months ago (2015-02-12 22:31:25 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu13.10-GCC4.8-Arm7-Debug-Android-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu13.10-GCC4.8-Arm7-Debug-Android-Trybot/builds/1994)
5 years, 10 months ago (2015-02-12 22:33:18 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/100001
5 years, 10 months ago (2015-02-12 23:23:05 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu13.10-GCC4.8-Arm7-Debug-Android-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu13.10-GCC4.8-Arm7-Debug-Android-Trybot/builds/1999)
5 years, 10 months ago (2015-02-12 23:25:16 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/120001
5 years, 10 months ago (2015-02-13 18:23:21 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot/builds/2109)
5 years, 10 months ago (2015-02-13 18:25:06 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/140001
5 years, 10 months ago (2015-02-13 18:36:25 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-VS2013-x86-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-VS2013-x86-Debug-Trybot/builds/2460)
5 years, 10 months ago (2015-02-13 18:56:56 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/160001
5 years, 10 months ago (2015-02-13 19:23:45 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-VS2013-x86-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-VS2013-x86-Debug-Trybot/builds/2467)
5 years, 10 months ago (2015-02-13 19:48:37 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/180001
5 years, 10 months ago (2015-02-13 21:59:27 UTC) #32
commit-bot: I haz the power
This issue passed the CQ. To commit it, remove "COMMIT=false" from the description and try ...
5 years, 10 months ago (2015-02-13 22:18:19 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/200001
5 years, 10 months ago (2015-02-17 23:16:09 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/240001
5 years, 10 months ago (2015-02-18 04:25:20 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/260001
5 years, 10 months ago (2015-02-18 11:38:22 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/340001
5 years, 10 months ago (2015-02-18 12:22:31 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/918813002/360001
5 years, 10 months ago (2015-02-18 19:04:18 UTC) #53
commit-bot: I haz the power
5 years, 10 months ago (2015-02-18 19:30:02 UTC) #54
Message was sent while issue was closed.
Committed patchset #11 (id:360001) as
https://skia.googlesource.com/skia/+/1b5c604d9d344537941b11b136348edfc39f236c

Powered by Google App Engine
This is Rietveld 408576698