Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(151)

Issue 4700045: [PDF] Make stream compression optional on a per device basis. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 2 months ago by Steve VanDeBogart
Modified:
13 years, 2 months ago
Reviewers:
Chris Guillory, reed1
CC:
skia-review_googlegroups.com, kmadhusu_chromium.org, arthurhsu
Base URL:
https://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

[PDF] Make stream compression optional on a per device basis. There are a lot of small pieces to make this change work: - SkPDFDocument (and SkPDFCatalog) take flags to disable compression (and font embedding - not implemented yet, can disable font subsetting for now). - SkPDFStream now defers compression until the size/emit step. - Classes that *had* a stream (because they didn't know the stream size at construction time) now *are* streams to make the substitution work correctly. - The SkPDFShader implementation got pulled apart into two classes, one that is a SkPDFDict, and one that is a SkPDFStream (making the common ancestor SkPDFObject). - Added helper methods in SkPDFObject for children that have simple resource lists. - Added an iterator to SkPDFDict so that a substitute SkPDFStream can get a copy of the stream dictionary. - Change SkPDFDocument to have a pointer to an SkPDFCatalog to remove a new circular header reference. Committed: http://code.google.com/p/skia/source/detail?r=1911

Patch Set 1 #

Patch Set 2 : nit #

Total comments: 28

Patch Set 3 : Address comments and rebase #

Total comments: 2

Patch Set 4 : Address comments and rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+483 lines, -355 lines) Patch
M include/pdf/SkPDFCatalog.h View 1 2 4 chunks +8 lines, -1 line 0 comments Download
M include/pdf/SkPDFDevice.h View 1 chunk +1 line, -1 line 0 comments Download
M include/pdf/SkPDFDocument.h View 1 2 3 chunks +10 lines, -3 lines 0 comments Download
M include/pdf/SkPDFFormXObject.h View 2 chunks +1 line, -19 lines 0 comments Download
M include/pdf/SkPDFImage.h View 3 chunks +1 line, -19 lines 0 comments Download
M include/pdf/SkPDFShader.h View 1 2 3 2 chunks +10 lines, -48 lines 0 comments Download
M include/pdf/SkPDFStream.h View 1 2 3 2 chunks +31 lines, -5 lines 0 comments Download
M include/pdf/SkPDFTypes.h View 1 2 3 3 chunks +32 lines, -2 lines 0 comments Download
M src/core/SkFlate.cpp View 1 chunk +0 lines, -4 lines 0 comments Download
M src/pdf/SkPDFCatalog.cpp View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pdf/SkPDFDocument.cpp View 1 2 3 6 chunks +43 lines, -31 lines 0 comments Download
M src/pdf/SkPDFFont.cpp View 1 2 3 1 chunk +1 line, -6 lines 0 comments Download
M src/pdf/SkPDFFormXObject.cpp View 2 chunks +2 lines, -30 lines 0 comments Download
M src/pdf/SkPDFGraphicState.cpp View 1 2 3 1 chunk +1 line, -6 lines 0 comments Download
M src/pdf/SkPDFImage.cpp View 2 chunks +2 lines, -34 lines 0 comments Download
M src/pdf/SkPDFShader.cpp View 1 2 3 7 chunks +115 lines, -73 lines 0 comments Download
M src/pdf/SkPDFStream.cpp View 1 2 3 1 chunk +83 lines, -23 lines 0 comments Download
M src/pdf/SkPDFTypes.cpp View 1 2 3 3 chunks +41 lines, -3 lines 0 comments Download
M tests/PDFPrimitivesTest.cpp View 1 6 chunks +97 lines, -44 lines 0 comments Download

Messages

Total messages: 10
Steve VanDeBogart
I wanted to get this done before I left, but it turned out to require ...
13 years, 2 months ago (2011-07-13 20:55:21 UTC) #1
Steve VanDeBogart
So, do you want me to break this out into smaller changes?
13 years, 2 months ago (2011-07-19 00:12:16 UTC) #2
Chris Guillory
If you think that makes sense. I haven't gotten through this one just yet. On ...
13 years, 2 months ago (2011-07-19 01:31:33 UTC) #3
Chris Guillory
LGTM. Some comments. http://codereview.appspot.com/4700045/diff/2001/include/pdf/SkPDFCatalog.h File include/pdf/SkPDFCatalog.h (right): http://codereview.appspot.com/4700045/diff/2001/include/pdf/SkPDFCatalog.h#newcode68 include/pdf/SkPDFCatalog.h:68: SkPDFDocument::Flags getDocumentFlags() { return fDocumentFlags; } ...
13 years, 2 months ago (2011-07-19 18:27:45 UTC) #4
reed1
http://codereview.appspot.com/4700045/diff/2001/include/pdf/SkPDFDocument.h File include/pdf/SkPDFDocument.h (left): http://codereview.appspot.com/4700045/diff/2001/include/pdf/SkPDFDocument.h#oldcode56 include/pdf/SkPDFDocument.h:56: private: What is motivating going from an embedded object ...
13 years, 2 months ago (2011-07-19 18:41:53 UTC) #5
Steve VanDeBogart
http://codereview.appspot.com/4700045/diff/2001/include/pdf/SkPDFDocument.h File include/pdf/SkPDFDocument.h (left): http://codereview.appspot.com/4700045/diff/2001/include/pdf/SkPDFDocument.h#oldcode56 include/pdf/SkPDFDocument.h:56: private: On 2011/07/19 18:41:53, reed1 wrote: > What is ...
13 years, 2 months ago (2011-07-19 18:49:24 UTC) #6
reed1
Too bad. On Tue, Jul 19, 2011 at 2:49 PM, <vandebo@chromium.org> wrote: > > http://codereview.appspot.com/4700045/diff/2001/include/pdf/SkPDFDocument.h ...
13 years, 2 months ago (2011-07-19 18:50:51 UTC) #7
Steve VanDeBogart
http://codereview.appspot.com/4700045/diff/2001/include/pdf/SkPDFCatalog.h File include/pdf/SkPDFCatalog.h (right): http://codereview.appspot.com/4700045/diff/2001/include/pdf/SkPDFCatalog.h#newcode68 include/pdf/SkPDFCatalog.h:68: SkPDFDocument::Flags getDocumentFlags() { return fDocumentFlags; } On 2011/07/19 18:27:45, ...
13 years, 2 months ago (2011-07-20 01:28:26 UTC) #8
Chris Guillory
http://codereview.appspot.com/4700045/diff/15001/include/pdf/SkPDFStream.h File include/pdf/SkPDFStream.h (right): http://codereview.appspot.com/4700045/diff/15001/include/pdf/SkPDFStream.h#newcode63 include/pdf/SkPDFStream.h:63: kUnused_State, //<The stream hasn't been requested yet. Need ! ...
13 years, 2 months ago (2011-07-20 01:32:41 UTC) #9
Steve VanDeBogart
13 years, 2 months ago (2011-07-20 17:38:40 UTC) #10
http://codereview.appspot.com/4700045/diff/15001/include/pdf/SkPDFStream.h
File include/pdf/SkPDFStream.h (right):

http://codereview.appspot.com/4700045/diff/15001/include/pdf/SkPDFStream.h#ne...
include/pdf/SkPDFStream.h:63: kUnused_State,         //<The stream hasn't been
requested yet.
On 2011/07/20 01:32:41, Chris Guillory wrote:
> Need ! here too.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b