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

Issue 24811002: Update the SkDocument interface to allow for 1) abort won't emit pdf, 2) close can report success/f… (Closed)

Created:
7 years, 2 months ago by edisonn
Modified:
7 years, 2 months ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Add SkPDFDeviceFlatenner which extends SkPDFDevice to add support to flatten the path and the text when we have perspective. prepare to deprecate SkPDFDevice constructor, and route gm and render_pdfs to use SkDocument::Create pdf interface instead. - controlled by a flag add comments where we are supposed to flatten other features (paint, shaders, ... ) Committed: http://code.google.com/p/skia/source/detail?r=11751

Patch Set 1 #

Total comments: 20

Patch Set 2 : upload git local changes, just in case my computer has an issue over weekend #

Patch Set 3 : fir mustFllate* #

Patch Set 4 : perspective drawText() impl #

Patch Set 5 : cleanup before sending to review #

Patch Set 6 : more cleanup #

Patch Set 7 : update comments #

Total comments: 26

Patch Set 8 : fixes after code review #

Total comments: 2

Patch Set 9 : move SkPDFDevice in separate files, and various fixes #

Total comments: 14

Patch Set 10 : updates #

Total comments: 9

Patch Set 11 : reupload after fixing conflicts #

Patch Set 12 : gm flag + code cleanup #

Patch Set 13 : code updates #

Patch Set 14 : fix drawpath #

Patch Set 15 : fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+354 lines, -122 lines) Patch
M gm/gm_error.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M gm/gmmain.cpp View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +82 lines, -58 lines 0 comments Download
M gyp/pdf.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M gyp/pdf.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkDraw.h View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
include/pdf/SkPDFDevice.h View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -1 line 0 comments Download
M src/doc/SkDocument_PDF.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -11 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A src/pdf/SkPDFDeviceFlattener.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +53 lines, -0 lines 0 comments Download
A src/pdf/SkPDFDeviceFlattener.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +155 lines, -0 lines 0 comments Download
M src/pdf/SkPDFShader.cpp View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M tools/PdfRenderer.h View 1 2 3 4 5 3 chunks +8 lines, -10 lines 0 comments Download
M tools/PdfRenderer.cpp View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -22 lines 0 comments Download
M tools/render_pdfs_main.cpp View 1 2 3 4 2 chunks +17 lines, -15 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
edisonn
Please continue the code review here, I messed up my git and I am continuing ...
7 years, 2 months ago (2013-09-26 19:45:56 UTC) #1
bungeman-skia
https://codereview.chromium.org/24811002/diff/1/include/core/SkDocument.h File include/core/SkDocument.h (right): https://codereview.chromium.org/24811002/diff/1/include/core/SkDocument.h#newcode11 include/core/SkDocument.h:11: #include "SkPDFCallbacks.h" core should not depend on PDF.
7 years, 2 months ago (2013-09-26 19:52:38 UTC) #2
scroggo
On 2013/09/26 19:45:56, edisonn wrote: > Please continue the code review here, I messed up ...
7 years, 2 months ago (2013-09-26 21:10:31 UTC) #3
scroggo
https://codereview.chromium.org/24811002/diff/1/include/pdf/SkPDFCallbacks.h File include/pdf/SkPDFCallbacks.h (right): https://codereview.chromium.org/24811002/diff/1/include/pdf/SkPDFCallbacks.h#newcode26 include/pdf/SkPDFCallbacks.h:26: typedef bool (*EncodeToDCTStream)(SkWStream* stream, const SkBitmap& bitmap, const SkIRect& ...
7 years, 2 months ago (2013-09-26 22:05:54 UTC) #4
vandebo (ex-Chrome)
https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp#newcode628 gm/gmmain.cpp:628: canvas->setMatrix(initialTransform); Until the old constructor is removed, I think ...
7 years, 2 months ago (2013-09-27 15:50:16 UTC) #5
edisonn
https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp#newcode628 gm/gmmain.cpp:628: canvas->setMatrix(initialTransform); On 2013/09/27 15:50:17, vandebo wrote: > Until the ...
7 years, 2 months ago (2013-10-04 19:40:37 UTC) #6
reed1
https://codereview.chromium.org/24811002/diff/24001/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.chromium.org/24811002/diff/24001/gm/gmmain.cpp#newcode626 gm/gmmain.cpp:626: SkAutoTUnref<SkDocument> pdfDoc(SkDocument::CreatePDF(&pdf, NULL, encode_to_dct_data)); Can we move the SUPPORT_PDF ...
7 years, 2 months ago (2013-10-07 13:24:54 UTC) #7
edisonn
https://codereview.chromium.org/24811002/diff/24001/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.chromium.org/24811002/diff/24001/gm/gmmain.cpp#newcode626 gm/gmmain.cpp:626: SkAutoTUnref<SkDocument> pdfDoc(SkDocument::CreatePDF(&pdf, NULL, encode_to_dct_data)); On 2013/10/07 13:24:54, reed1 wrote: ...
7 years, 2 months ago (2013-10-07 19:29:06 UTC) #8
reed1
trimSIze is the size of the content? why not call it content-size? mediaBox is the ...
7 years, 2 months ago (2013-10-07 19:39:42 UTC) #9
vandebo (ex-Chrome)
Comments that never got sent. https://codereview.chromium.org/24811002/diff/1/src/pdf/SkPDFShader.cpp File src/pdf/SkPDFShader.cpp (right): https://codereview.chromium.org/24811002/diff/1/src/pdf/SkPDFShader.cpp#newcode875 src/pdf/SkPDFShader.cpp:875: SkCanvasSimplifier canvas(&pattern); On 2013/10/04 ...
7 years, 2 months ago (2013-10-07 22:34:10 UTC) #10
edisonn
https://codereview.chromium.org/24811002/diff/1/src/pdf/SkPDFShader.cpp File src/pdf/SkPDFShader.cpp (right): https://codereview.chromium.org/24811002/diff/1/src/pdf/SkPDFShader.cpp#newcode875 src/pdf/SkPDFShader.cpp:875: SkCanvasSimplifier canvas(&pattern); On 2013/10/07 22:34:10, vandebo wrote: > On ...
7 years, 2 months ago (2013-10-08 17:55:30 UTC) #11
vandebo (ex-Chrome)
https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp#newcode628 gm/gmmain.cpp:628: canvas->setMatrix(initialTransform); On 2013/10/04 19:40:37, edisonn wrote: > On 2013/09/27 ...
7 years, 2 months ago (2013-10-08 23:37:05 UTC) #12
edisonn
https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp#newcode628 gm/gmmain.cpp:628: canvas->setMatrix(initialTransform); On 2013/10/08 23:37:06, vandebo wrote: > On 2013/10/04 ...
7 years, 2 months ago (2013-10-09 13:25:55 UTC) #13
reed1
This CL is 12 days old. Please focus on core attributes so we know how ...
7 years, 2 months ago (2013-10-09 13:33:47 UTC) #14
vandebo (ex-Chrome)
https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp#newcode628 gm/gmmain.cpp:628: canvas->setMatrix(initialTransform); On 2013/10/09 13:25:55, edisonn wrote: > On 2013/10/08 ...
7 years, 2 months ago (2013-10-09 16:52:31 UTC) #15
reed1
https://codereview.chromium.org/24811002/diff/57001/src/pdf/SkPDFDeviceFlattener.cpp File src/pdf/SkPDFDeviceFlattener.cpp (right): https://codereview.chromium.org/24811002/diff/57001/src/pdf/SkPDFDeviceFlattener.cpp#newcode75 src/pdf/SkPDFDeviceFlattener.cpp:75: path.addPath(origpath); if your intention is to always make a ...
7 years, 2 months ago (2013-10-09 17:03:54 UTC) #16
edisonn
https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.chromium.org/24811002/diff/1/gm/gmmain.cpp#newcode628 gm/gmmain.cpp:628: canvas->setMatrix(initialTransform); On 2013/10/09 16:52:32, vandebo wrote: > On 2013/10/09 ...
7 years, 2 months ago (2013-10-10 18:35:14 UTC) #17
vandebo (ex-Chrome)
LGTM
7 years, 2 months ago (2013-10-10 23:02:21 UTC) #18
edisonn
Since the CL is editing public API, you must have an LGTM from one of: ...
7 years, 2 months ago (2013-10-11 14:24:18 UTC) #19
reed1
lgtm
7 years, 2 months ago (2013-10-14 13:16:01 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/edisonn@google.com/24811002/81001
7 years, 2 months ago (2013-10-14 13:31:54 UTC) #21
commit-bot: I haz the power
7 years, 2 months ago (2013-10-14 13:42:18 UTC) #22
Message was sent while issue was closed.
Change committed as 11751

Powered by Google App Engine
This is Rietveld 408576698