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

Issue 846023003: In SkPDFDocument::emitPDF(), stop pre-calculating file offsets. (Closed)

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

Description

In SkPDFDocument::emitPDF(), stop pre-calculating file offsets. * Add Streamer utility class which measures the current pdf offset by calling SkWStream::bytesWritten(). Calls SkPDFCatalog::setFileOffset() and SkPDFObject::emit() at the same time to guarantee that everything works out. * SkPDFCatalog::setFileOffset() no longer calculates the object's size. * SkPDFCatalog::setSubstituteResourcesOffsets() removed. * SkPDFCatalog::emitSubstituteResources() removed and getSubstituteList() made public in its place. * Remove SkPDFPage::getPageSize and SkPDFPage::emitPage. Replace with SkPDFPage::getContentStream(). * SkPDFObject::getOutputSize no longer virtual, only used in unit tests. All SkPDFObject subclasses getOutputSize() overrides removed. * SkPDFObject::getIndirectOutputSize removed. * PDFPrimitivesTest updated for new functions. Committed: https://skia.googlesource.com/skia/+/f361b714390422a5c2a8b1dacb8e67502d0e40bb

Patch Set 1 #

Total comments: 4

Patch Set 2 : nit: space between functions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -198 lines) Patch
M src/pdf/SkPDFCatalog.h View 3 chunks +4 lines, -14 lines 0 comments Download
M src/pdf/SkPDFCatalog.cpp View 2 chunks +1 line, -20 lines 0 comments Download
M src/pdf/SkPDFDocument.cpp View 1 3 chunks +45 lines, -38 lines 0 comments Download
M src/pdf/SkPDFGraphicState.h View 1 chunk +2 lines, -3 lines 0 comments Download
M src/pdf/SkPDFGraphicState.cpp View 1 chunk +0 lines, -6 lines 0 comments Download
M src/pdf/SkPDFPage.h View 2 chunks +2 lines, -15 lines 0 comments Download
M src/pdf/SkPDFPage.cpp View 2 chunks +4 lines, -11 lines 0 comments Download
M src/pdf/SkPDFStream.h View 1 chunk +1 line, -2 lines 0 comments Download
M src/pdf/SkPDFStream.cpp View 1 chunk +0 lines, -13 lines 0 comments Download
M src/pdf/SkPDFTypes.h View 7 chunks +2 lines, -9 lines 0 comments Download
M src/pdf/SkPDFTypes.cpp View 7 chunks +0 lines, -63 lines 0 comments Download
M tests/PDFPrimitivesTest.cpp View 1 chunk +10 lines, -4 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/846023003/1
5 years, 11 months ago (2015-01-12 19:47:13 UTC) #2
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 11 months ago (2015-01-12 19:47:14 UTC) #3
hal.canary
ptal
5 years, 11 months ago (2015-01-12 19:47:51 UTC) #6
djsollen
https://codereview.chromium.org/846023003/diff/1/src/pdf/SkPDFDocument.cpp File src/pdf/SkPDFDocument.cpp (right): https://codereview.chromium.org/846023003/diff/1/src/pdf/SkPDFDocument.cpp#newcode91 src/pdf/SkPDFDocument.cpp:91: void stream(SkPDFObject* obj) { nit: space between functions https://codereview.chromium.org/846023003/diff/1/src/pdf/SkPDFPage.cpp ...
5 years, 11 months ago (2015-01-13 13:49:47 UTC) #7
hal.canary
https://codereview.chromium.org/846023003/diff/1/src/pdf/SkPDFDocument.cpp File src/pdf/SkPDFDocument.cpp (right): https://codereview.chromium.org/846023003/diff/1/src/pdf/SkPDFDocument.cpp#newcode91 src/pdf/SkPDFDocument.cpp:91: void stream(SkPDFObject* obj) { On 2015/01/13 13:49:47, djsollen wrote: ...
5 years, 11 months ago (2015-01-13 14:00:27 UTC) #8
djsollen
As long as pages don't have indirect objects then this LGTM
5 years, 11 months ago (2015-01-13 14:35:03 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/846023003/20001
5 years, 11 months ago (2015-01-13 15:04:10 UTC) #11
commit-bot: I haz the power
5 years, 11 months ago (2015-01-13 15:13:02 UTC) #12
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://skia.googlesource.com/skia/+/f361b714390422a5c2a8b1dacb8e67502d0e40bb

Powered by Google App Engine
This is Rietveld 408576698