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

Issue 1046293002: SkPDF: SkPDFGraphicState Lookup hashtabled (Closed)

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

Description

SkPDF: SkPDFGraphicState Lookup hashtabled In Release, running `dm --src skp --config pdf`, I get a speedup of about 1.2%. SkPDFGraphicState class: - Holds the subset of SkPaint that maps to a PDF Graphics State - These fields are easily comparable, making hashtable comparisons easy. SkPDFCanon: - findGraphicState() takes a SkPDFGraphicState, not a SkPaint - fGraphicStateRecords is a SkHashSet, not a SkTDArray SkPDFGraphicState: - mode_for_pdf() replaces logic inside equivalent(), but is only called once per lookup. - emitObject() no longer modifies the SkPDFGraphicState to cache the SkPDFDict stucture. (Since it is de-duped, this get no speedup). - Static Functions that don't use the canon return a plain SkPDFDict now. No need for fPopulated. SkTHash.h - SkHashSet::forall added SkPDFDevice; SkPDFShader - Updated for new SkPDFGraphicState interface. BUG=skia:3585 Committed: https://skia.googlesource.com/skia/+/be27a118c277af23377d38e9b3bfd3fcc276114f

Patch Set 1 #

Patch Set 2 : formatting #

Patch Set 3 : clean #

Total comments: 14

Patch Set 4 : 2015-04-01 (Wednesday) 12:13:16 EDT #

Patch Set 5 : 2015-04-01 (Wednesday) 15:16:07 EDT #

Patch Set 6 : 2015-04-01 (Wednesday) 15:28:18 EDT #

Total comments: 6

Patch Set 7 : 2015-04-01 (Wednesday) 15:58:42 EDT #

Patch Set 8 : 2015-04-01 (Wednesday) 16:16:21 EDT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -156 lines) Patch
M src/core/SkTHash.h View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M src/pdf/SkPDFCanon.h View 1 2 3 4 5 6 3 chunks +18 lines, -4 lines 0 comments Download
M src/pdf/SkPDFCanon.cpp View 1 2 3 4 5 6 3 chunks +10 lines, -6 lines 0 comments Download
M src/pdf/SkPDFDevice.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M src/pdf/SkPDFGraphicState.h View 1 2 3 4 5 6 3 chunks +24 lines, -23 lines 0 comments Download
M src/pdf/SkPDFGraphicState.cpp View 1 2 3 4 5 6 7 3 chunks +94 lines, -116 lines 0 comments Download
M src/pdf/SkPDFShader.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
hal.canary
ptal
5 years, 8 months ago (2015-03-31 22:48:45 UTC) #2
mtklein
https://codereview.chromium.org/1046293002/diff/40001/src/pdf/SkPDFGraphicState.cpp File src/pdf/SkPDFGraphicState.cpp (right): https://codereview.chromium.org/1046293002/diff/40001/src/pdf/SkPDFGraphicState.cpp#newcode109 src/pdf/SkPDFGraphicState.cpp:109: SkPDFGraphicState* pdfGraphicState = canon->findGraphicState(pdfPaint); Uh, isn't this just logically ...
5 years, 8 months ago (2015-04-01 12:23:46 UTC) #3
hal.canary
moved a lot of code around, simplified, but basic logic is the same. https://codereview.chromium.org/1046293002/diff/40001/src/pdf/SkPDFGraphicState.cpp File ...
5 years, 8 months ago (2015-04-01 16:18:18 UTC) #4
hal.canary
PTAL
5 years, 8 months ago (2015-04-01 19:32:55 UTC) #6
mtklein
lgtm https://codereview.chromium.org/1046293002/diff/120001/src/pdf/SkPDFCanon.cpp File src/pdf/SkPDFCanon.cpp (right): https://codereview.chromium.org/1046293002/diff/120001/src/pdf/SkPDFCanon.cpp#newcode113 src/pdf/SkPDFCanon.cpp:113: return ptr ? ptr->fPtr : NULL; It does ...
5 years, 8 months ago (2015-04-01 20:05:39 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1046293002/140001
5 years, 8 months ago (2015-04-01 20:05:56 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/298)
5 years, 8 months ago (2015-04-01 20:12:34 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1046293002/160001
5 years, 8 months ago (2015-04-01 20:18:24 UTC) #14
commit-bot: I haz the power
5 years, 8 months ago (2015-04-01 20:31:23 UTC) #15
Message was sent while issue was closed.
Committed patchset #8 (id:160001) as
https://skia.googlesource.com/skia/+/be27a118c277af23377d38e9b3bfd3fcc276114f

Powered by Google App Engine
This is Rietveld 408576698