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

Issue 1829693002: SkPDF: draw{Image,Bitmap} always serializes early (Closed)

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

Description

SkPDF: draw{Image,Bitmap} always serializes early Before this change, the PDFCanon held a map from BitmapKeys to SkImages for de-duping bitmaps. Even if the PDFDocument serialized images early, the Canon still held a ref to that image inside the map. With this change, the Canon holds a single map from BitmapKeys to PDFObjects. Now, Images are only held by the PDFObject, which the document serializes and drops early. This change also: - Moves SkBitmapKey into its own header (for possible reuse); it now can operate with images as well as bitmaps. - Creates SkImageBitmap, which wraps a pointer to a bitmap or an image and abstracts out some common tasks so that drawBitmap and drawImage behave the same. - Modifies SkPDFCreateBitmapObject to take and return a sk_sp<T>, not a T*. - Refactors SkPDFDevice::internalDrawImage to use bitmaps or images (via a SkImageBitmap). - Turns on pre-serialization of all images. BUG=skia:5087 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1829693002 Committed: https://skia.googlesource.com/skia/+/a50151dcb5a0b8bfdef383e363e519c91d2d2c7a

Patch Set 1 : 2016-03-23 (Wednesday) 09:16:17 EDT #

Patch Set 2 : Don't put a sk_sp in a hashmap #

Total comments: 2

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -125 lines) Patch
M bench/PDFBench.cpp View 1 2 5 chunks +6 lines, -8 lines 0 comments Download
M gyp/pdf.gypi View 1 chunk +1 line, -0 lines 0 comments Download
A src/pdf/SkBitmapKey.h View 1 chunk +66 lines, -0 lines 0 comments Download
M src/pdf/SkPDFBitmap.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/pdf/SkPDFBitmap.cpp View 5 chunks +16 lines, -13 lines 0 comments Download
M src/pdf/SkPDFCanon.h View 1 3 chunks +8 lines, -22 lines 0 comments Download
M src/pdf/SkPDFCanon.cpp View 1 2 chunks +7 lines, -23 lines 0 comments Download
M src/pdf/SkPDFDevice.h View 1 2 2 chunks +5 lines, -4 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 1 2 9 chunks +43 lines, -53 lines 0 comments Download
M src/pdf/SkPDFDocument.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/pdf/SkPDFDocument.cpp View 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 41 (22 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829693002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829693002/1
4 years, 9 months ago (2016-03-23 12:56:49 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Mac-Clang-x86_64-Release-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Mac-Clang-x86_64-Release-Trybot/builds/1402) Build-Ubuntu-Clang-x86_64-Debug-Trybot on ...
4 years, 9 months ago (2016-03-23 12:58:00 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829693002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829693002/40001
4 years, 9 months ago (2016-03-23 13:11:46 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Mac-Clang-x86_64-Release-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Mac-Clang-x86_64-Release-Trybot/builds/1403) Build-Ubuntu-Clang-x86_64-Debug-Trybot on ...
4 years, 9 months ago (2016-03-23 13:12:57 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829693002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829693002/60001
4 years, 9 months ago (2016-03-23 13:16:48 UTC) #13
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-23 13:27:17 UTC) #16
hal.canary
PTAL. This flips the switch.
4 years, 9 months ago (2016-03-23 13:40:18 UTC) #18
tomhudson
Once again your change description tells me what you did but not why. (And what ...
4 years, 9 months ago (2016-03-23 13:45:33 UTC) #19
hal.canary
On 2016/03/23 13:45:33, tomhudson wrote: > Once again your change description tells me what you ...
4 years, 9 months ago (2016-03-23 14:53:17 UTC) #21
tomhudson
On 2016/03/23 14:53:17, Hal Canary wrote: > On 2016/03/23 13:45:33, tomhudson wrote: > > Once ...
4 years, 9 months ago (2016-03-23 15:01:25 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829693002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829693002/100001
4 years, 9 months ago (2016-03-23 16:06:00 UTC) #25
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-23 16:17:11 UTC) #28
hal.canary
On 2016/03/23 15:01:25, tomhudson wrote: > Needs wordsmithing,... done
4 years, 9 months ago (2016-03-24 15:13:42 UTC) #30
tomhudson
lgtm https://codereview.chromium.org/1829693002/diff/100001/src/pdf/SkBitmapKey.h File src/pdf/SkBitmapKey.h (right): https://codereview.chromium.org/1829693002/diff/100001/src/pdf/SkBitmapKey.h#newcode41 src/pdf/SkBitmapKey.h:41: explicit SkImageBitmap(SkImage* i) : fImage(i) { SkASSERT(fImage); } ...
4 years, 9 months ago (2016-03-25 17:38:48 UTC) #31
hal.canary
https://codereview.chromium.org/1829693002/diff/100001/src/pdf/SkBitmapKey.h File src/pdf/SkBitmapKey.h (right): https://codereview.chromium.org/1829693002/diff/100001/src/pdf/SkBitmapKey.h#newcode41 src/pdf/SkBitmapKey.h:41: explicit SkImageBitmap(SkImage* i) : fImage(i) { SkASSERT(fImage); } On ...
4 years, 9 months ago (2016-03-25 18:25:21 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829693002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829693002/100001
4 years, 9 months ago (2016-03-25 18:25:41 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/7387) Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, ...
4 years, 9 months ago (2016-03-25 18:26:52 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829693002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829693002/120001
4 years, 9 months ago (2016-03-25 18:36:51 UTC) #39
commit-bot: I haz the power
4 years, 9 months ago (2016-03-25 18:57:53 UTC) #41
Message was sent while issue was closed.
Committed patchset #3 (id:120001) as
https://skia.googlesource.com/skia/+/a50151dcb5a0b8bfdef383e363e519c91d2d2c7a

Powered by Google App Engine
This is Rietveld 408576698