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

Issue 2146103004: SkPDF: re-work SkPDFUtils::FloatToDecimal (Closed)

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

Description

SkPDF: re-work SkPDFUtils::FloatToDecimal * do a lot less floating-point math by converting to an integer as early as possible [faster]. * round rather than truncate. * use 8 significant digits rather than 9 when possible. * remove trailing zeros in fractions. before: 0.12 ! PDFScalar nonrendering after: 0.07 ! PDFScalar nonrendering Accuracy guaranteed by existing unit test. Example diffs: -/Shading <</Function <</C0 [.321568638 .333333343 .321568638] +/Shading <</Function <</C0 [.32156864 .33333334 .32156864] -/C1 [.258823543 .270588248 .258823543] +/C1 [.25882354 .27058825 .25882354] -1 0 0 -1 20 120.394500 Tm +1 0 0 -1 20 120.394501 Tm -1 0 0 -1 20 184.789001 Tm +1 0 0 -1 20 184.789 Tm -291.503997 0 l +291.504 0 l BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146103004 Committed: https://skia.googlesource.com/skia/+/56586b6f3dc824431958946ac8c27f0c0b564a3d

Patch Set 1 #

Patch Set 2 : 2016-07-14 (Thursday) 15:50:08 EDT #

Total comments: 14

Patch Set 3 : 2016-07-16 (Saturday) 22:33:13 EDT #

Patch Set 4 : 2016-07-25 (Monday) 15:22:36 EDT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -127 lines) Patch
M src/pdf/SkPDFUtils.cpp View 1 2 2 chunks +92 lines, -50 lines 0 comments Download
M tests/PDFPrimitivesTest.cpp View 1 2 3 10 chunks +81 lines, -77 lines 0 comments Download

Messages

Total messages: 39 (32 generated)
hal.canary
PTAL
4 years, 5 months ago (2016-07-14 19:24:23 UTC) #5
tomhudson
I'm out for the next week, so you'll want another reviewer if you want to ...
4 years, 5 months ago (2016-07-15 20:45:42 UTC) #13
hal.canary
https://codereview.chromium.org/2146103004/diff/20001/src/pdf/SkPDFUtils.cpp File src/pdf/SkPDFUtils.cpp (right): https://codereview.chromium.org/2146103004/diff/20001/src/pdf/SkPDFUtils.cpp#newcode261 src/pdf/SkPDFUtils.cpp:261: // Return pow(10.0, e), optimized for common cases. On ...
4 years, 5 months ago (2016-07-17 02:33:42 UTC) #14
hal.canary
Tom, want to look at this again?
4 years, 5 months ago (2016-07-25 20:52:57 UTC) #34
tomhudson
lgtm
4 years, 5 months ago (2016-07-25 20:58:14 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2146103004/140001
4 years, 5 months ago (2016-07-25 20:58:43 UTC) #37
commit-bot: I haz the power
4 years, 5 months ago (2016-07-25 20:59:33 UTC) #39
Message was sent while issue was closed.
Committed patchset #4 (id:140001) as
https://skia.googlesource.com/skia/+/56586b6f3dc824431958946ac8c27f0c0b564a3d

Powered by Google App Engine
This is Rietveld 408576698