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

Issue 340783013: Switch SkPDFStream's internal storage from SkStream to SkData (Closed)

Created:
6 years, 6 months ago by hal.canary
Modified:
6 years, 5 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Switch SkPDFStream's internal storage from SkStream to SkData Motivation: This makes SkPDFStream thread-safe for two threads serializing it at once, since a SkStream has an internal position. Updated SkPDFFont, SkPDFGraphicState, and SkPDFPage's use of SkPDFStream to use the SkData constructor rather than the SkStream constructor (saving a memcpy). BUG=skia:2683 Committed: https://skia.googlesource.com/skia/+/c1dfa14b645ae274780f026dd86c9b633fbdad06 Committed: https://skia.googlesource.com/skia/+/67ec1f8eecfb48bc0a6ba04c0057f103c1c9696f

Patch Set 1 #

Total comments: 9

Patch Set 2 : AnotherPatchSet #

Total comments: 14

Patch Set 3 : AnotherPatchSet #

Patch Set 4 : AnotherPatchSet #

Total comments: 14

Patch Set 5 : AnotherPatchSet #

Patch Set 6 : AnotherPatchSet #

Total comments: 2

Patch Set 7 : AnotherPatchSet #

Patch Set 8 : images/SkStreamHelpers -> core/SkStreamPriv #

Total comments: 1

Patch Set 9 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+162 lines, -189 lines) Patch
M gyp/core.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M gyp/images.gyp View 1 2 3 4 5 6 7 2 chunks +0 lines, -4 lines 0 comments Download
M src/core/SkStream.cpp View 1 2 3 4 5 6 7 2 chunks +56 lines, -0 lines 0 comments Download
A + src/core/SkStreamPriv.h View 1 2 3 4 5 6 7 2 chunks +9 lines, -8 lines 0 comments Download
M src/images/SkImageDecoder_ktx.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M src/images/SkImageDecoder_libbmp.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M src/images/SkImageDecoder_libico.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M src/images/SkImageDecoder_pkm.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
D src/images/SkStreamHelpers.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -36 lines 0 comments Download
D src/images/SkStreamHelpers.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -67 lines 0 comments Download
M src/pdf/SkPDFFont.cpp View 1 2 3 4 5 6 6 chunks +43 lines, -28 lines 0 comments Download
M src/pdf/SkPDFGraphicState.cpp View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M src/pdf/SkPDFImage.cpp View 1 2 3 chunks +4 lines, -6 lines 0 comments Download
M src/pdf/SkPDFPage.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/pdf/SkPDFStream.h View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -8 lines 0 comments Download
M src/pdf/SkPDFStream.cpp View 1 2 3 4 5 6 7 8 5 chunks +22 lines, -17 lines 0 comments Download
M src/ports/SkImageDecoder_CG.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
hal.canary
ptal (fix for a subset of threading bugs)
6 years, 6 months ago (2014-06-25 15:37:20 UTC) #1
mtklein
https://codereview.chromium.org/340783013/diff/1/src/pdf/SkPDFStream.cpp File src/pdf/SkPDFStream.cpp (right): https://codereview.chromium.org/340783013/diff/1/src/pdf/SkPDFStream.cpp#newcode15 src/pdf/SkPDFStream.cpp:15: #include "../images/SkStreamHelpers.h" // CopyStreamToData Weird. Can't just #include "SkStreamHelpers.h" ...
6 years, 6 months ago (2014-06-25 15:53:17 UTC) #2
djsollen
https://codereview.chromium.org/340783013/diff/1/src/pdf/SkPDFStream.cpp File src/pdf/SkPDFStream.cpp (right): https://codereview.chromium.org/340783013/diff/1/src/pdf/SkPDFStream.cpp#newcode15 src/pdf/SkPDFStream.cpp:15: #include "../images/SkStreamHelpers.h" // CopyStreamToData On 2014/06/25 15:53:17, mtklein wrote: ...
6 years, 6 months ago (2014-06-25 17:35:59 UTC) #3
hal.canary
https://codereview.chromium.org/340783013/diff/1/src/pdf/SkPDFStream.cpp File src/pdf/SkPDFStream.cpp (right): https://codereview.chromium.org/340783013/diff/1/src/pdf/SkPDFStream.cpp#newcode15 src/pdf/SkPDFStream.cpp:15: #include "../images/SkStreamHelpers.h" // CopyStreamToData On 2014/06/25 17:35:59, djsollen wrote: ...
6 years, 6 months ago (2014-06-25 18:00:30 UTC) #4
mtklein
https://codereview.chromium.org/340783013/diff/40001/gyp/pdf.gyp File gyp/pdf.gyp (right): https://codereview.chromium.org/340783013/diff/40001/gyp/pdf.gyp#newcode21 gyp/pdf.gyp:21: '../src/images', # needed to get SkStreamHelpers.h sort? https://codereview.chromium.org/340783013/diff/40001/src/pdf/SkPDFFont.cpp File ...
6 years, 6 months ago (2014-06-25 18:12:31 UTC) #5
hal.canary
https://codereview.chromium.org/340783013/diff/40001/gyp/pdf.gyp File gyp/pdf.gyp (right): https://codereview.chromium.org/340783013/diff/40001/gyp/pdf.gyp#newcode21 gyp/pdf.gyp:21: '../src/images', # needed to get SkStreamHelpers.h On 2014/06/25 18:12:31, ...
6 years, 6 months ago (2014-06-25 18:56:26 UTC) #6
mtklein
https://codereview.chromium.org/340783013/diff/40001/src/pdf/SkPDFFont.cpp File src/pdf/SkPDFFont.cpp (right): https://codereview.chromium.org/340783013/diff/40001/src/pdf/SkPDFFont.cpp#newcode220 src/pdf/SkPDFFont.cpp:220: SkAutoMalloc buffer(length); On 2014/06/25 18:56:26, Hal Canary wrote: > ...
6 years, 6 months ago (2014-06-26 13:21:59 UTC) #7
hal.canary
https://codereview.chromium.org/340783013/diff/80001/src/pdf/SkPDFFont.cpp File src/pdf/SkPDFFont.cpp (right): https://codereview.chromium.org/340783013/diff/80001/src/pdf/SkPDFFont.cpp#newcode202 src/pdf/SkPDFFont.cpp:202: static const int pfbSectionHeaderLength = 6; On 2014/06/26 13:21:59, ...
6 years, 6 months ago (2014-06-26 18:42:02 UTC) #8
hal.canary
6 years, 6 months ago (2014-06-26 19:08:24 UTC) #9
mtklein
lgtm https://codereview.chromium.org/340783013/diff/120001/src/pdf/SkPDFFont.cpp File src/pdf/SkPDFFont.cpp (right): https://codereview.chromium.org/340783013/diff/120001/src/pdf/SkPDFFont.cpp#newcode206 src/pdf/SkPDFFont.cpp:206: SkAutoMalloc buffer(length); AutoTMalloc<uint8_t>? https://codereview.chromium.org/340783013/diff/120001/src/pdf/SkPDFFont.cpp#newcode234 src/pdf/SkPDFFont.cpp:234: SkAutoMalloc buffer(length); AutoTMalloc<char>?
6 years, 6 months ago (2014-06-26 19:28:37 UTC) #10
hal.canary
The CQ bit was checked by halcanary@google.com
6 years, 6 months ago (2014-06-26 20:19:24 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/halcanary@google.com/340783013/140001
6 years, 6 months ago (2014-06-26 20:19:43 UTC) #12
commit-bot: I haz the power
Change committed as c1dfa14b645ae274780f026dd86c9b633fbdad06
6 years, 6 months ago (2014-06-26 21:00:36 UTC) #13
rmistry
A revert of this CL has been created in https://codereview.chromium.org/354043005/ by rmistry@google.com. The reason for ...
6 years, 6 months ago (2014-06-26 21:30:45 UTC) #14
rmistry
Log of failures: http://108.170.220.120:10117/builders/Canary-Chrome-Win7-Ninja-x86-SharedLib_ToT/builds/382/steps/Retry_NoWarningsAsErrors_BuildChrome/logs/stdio
6 years, 6 months ago (2014-06-26 21:32:08 UTC) #15
hal.canary
On 2014/06/26 21:32:08, rmistry wrote: > Log of failures: > http://108.170.220.120:10117/builders/Canary-Chrome-Win7-Ninja-x86-SharedLib_ToT/builds/382/steps/Retry_NoWarningsAsErrors_BuildChrome/logs/stdio I moved src/images/SkStreamHelpers.h to ...
6 years, 5 months ago (2014-06-27 13:52:18 UTC) #16
rmistry
6 years, 5 months ago (2014-06-27 13:55:21 UTC) #17
mtklein
Seems reasonable. You know, this is the sort of thing where more descriptive patch titles ...
6 years, 5 months ago (2014-06-27 13:57:31 UTC) #18
hal.canary
On 2014/06/27 13:57:31, mtklein wrote: > Seems reasonable. > > You know, this is the ...
6 years, 5 months ago (2014-06-27 14:09:39 UTC) #19
hal.canary
The CQ bit was checked by halcanary@google.com
6 years, 5 months ago (2014-06-27 17:22:40 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/halcanary@google.com/340783013/160001
6 years, 5 months ago (2014-06-27 17:23:45 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-06-27 17:38:09 UTC) #22
commit-bot: I haz the power
Failed to apply patch for src/pdf/SkPDFStream.h: While running git apply --index -p1; error: patch failed: ...
6 years, 5 months ago (2014-06-27 17:38:10 UTC) #23
hal.canary
The CQ bit was checked by halcanary@google.com
6 years, 5 months ago (2014-06-27 17:46:35 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/halcanary@google.com/340783013/180001
6 years, 5 months ago (2014-06-27 17:46:46 UTC) #25
commit-bot: I haz the power
6 years, 5 months ago (2014-06-27 18:36:26 UTC) #26
Message was sent while issue was closed.
Change committed as 67ec1f8eecfb48bc0a6ba04c0057f103c1c9696f

Powered by Google App Engine
This is Rietveld 408576698