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

Issue 2187083002: Add initial CurveMeasure code (Closed)

Created:
4 years, 4 months ago by Harry Stern
Modified:
4 years, 4 months ago
Reviewers:
mtklein, caryclark, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Add initial CurveMeasure code - This code is entirely private and is not being used by anything. - In a future CL we will write a class that uses CurveMeasure to compute dash points. In order to determine whether CurveMeasure or PathMeasure should be faster, we need the dash info (the sum of the on/off intervals and how many there are) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187083002 Committed: https://skia.googlesource.com/skia/+/0446a3c8e2a5f1d525b3e0595252e64c6cd3a753

Patch Set 1 #

Patch Set 2 : Implement evaluateQuad and evaluateQuadDerivative #

Total comments: 4

Patch Set 3 : Make various array parameters const #

Patch Set 4 : Add comment explaining weights and abscissa arrays #

Patch Set 5 : Fix build errors on windows #

Patch Set 6 : Fix some destructor weirdness because of the virtuals #

Patch Set 7 : Add initial measure benches #

Patch Set 8 : Refactor to get rid of the virtuals, use a switch on an enum for the curve type #

Patch Set 9 : Remove unused variable #

Total comments: 6

Patch Set 10 : Use SK_SIZE_T_SPECIFIER for printing size_t in bench #

Patch Set 11 : Use SK_VECTORCALL when passing Sk8f arguments #

Patch Set 12 : Various formatting changes #

Patch Set 13 : Add heuristic to normalize the number of inner loops in MeasureBench #

Patch Set 14 : Minor formatting changes #

Patch Set 15 : Change SkDebugf to SkDEBUGF #

Patch Set 16 : Make NORMALIZE_LOOPS a define since it's only for developer testing #

Patch Set 17 : Move evaluateDerivativeLength to a static function and put coefficients in array #

Patch Set 18 : Revert use of cubic in MeasureBench #

Total comments: 2

Patch Set 19 : Unindent public:/private: #

Patch Set 20 : Rebase off master #

Total comments: 1

Patch Set 21 : Include <algorithm> for overloaded min/max #

Unified diffs Side-by-side diffs Delta from patch set Stats (+543 lines, -0 lines) Patch
A bench/MeasureBench.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +177 lines, -0 lines 0 comments Download
M gyp/utils.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
A src/utils/SkCurveMeasure.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +81 lines, -0 lines 0 comments Download
A src/utils/SkCurveMeasure.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +283 lines, -0 lines 0 comments Download

Messages

Total messages: 53 (27 generated)
Harry Stern
So right now this code just does quads, but with only a tiny bit of ...
4 years, 4 months ago (2016-07-27 19:07:20 UTC) #4
reed1
My suggestion is remove cubic scaffolding for now. Will be interesting when we also see ...
4 years, 4 months ago (2016-07-27 19:59:43 UTC) #5
Harry Stern
On 2016/07/27 19:59:43, reed1 wrote: > My suggestion is remove cubic scaffolding for now. What ...
4 years, 4 months ago (2016-07-27 20:37:26 UTC) #7
Harry Stern
https://codereview.chromium.org/2187083002/diff/20001/src/utils/SkCurveMeasure.h File src/utils/SkCurveMeasure.h (right): https://codereview.chromium.org/2187083002/diff/20001/src/utils/SkCurveMeasure.h#newcode14 src/utils/SkCurveMeasure.h:14: static SkScalar weights8[8] = {0.3626837833783620, 0.3626837833783620, 0.3137066458778873, 0.3137066458778873, 0.2223810344533745, ...
4 years, 4 months ago (2016-07-27 20:39:08 UTC) #8
Harry Stern
I have initial benches. See https://paste.googleplex.com/4613472423772160?raw and https://paste.googleplex.com/5054831047737344?raw The CurveMeasure code is significantly slower on ...
4 years, 4 months ago (2016-07-28 17:04:25 UTC) #9
Harry Stern
I have initial benches. See https://paste.googleplex.com/4613472423772160?raw and https://paste.googleplex.com/5054831047737344?raw The CurveMeasure code is significantly slower on ...
4 years, 4 months ago (2016-07-28 17:04:28 UTC) #10
caryclark
On 2016/07/28 17:04:28, Harry Stern wrote: > I have initial benches. > > See https://paste.googleplex.com/4613472423772160?raw ...
4 years, 4 months ago (2016-07-28 17:15:07 UTC) #11
Harry Stern
On 2016/07/28 17:15:07, caryclark wrote: > On 2016/07/28 17:04:28, Harry Stern wrote: > > I ...
4 years, 4 months ago (2016-07-28 17:51:47 UTC) #12
caryclark
On 2016/07/28 17:51:47, Harry Stern wrote: > On 2016/07/28 17:15:07, caryclark wrote: > > On ...
4 years, 4 months ago (2016-07-28 18:13:35 UTC) #13
reed1
Can we defer the work to decide which/when to use the code after have an ...
4 years, 4 months ago (2016-08-02 20:59:54 UTC) #14
Harry Stern
On 2016/08/02 20:59:54, reed1 wrote: > Can we defer the work to decide which/when to ...
4 years, 4 months ago (2016-08-02 21:16:44 UTC) #17
Harry Stern
https://codereview.chromium.org/2187083002/diff/160001/src/utils/SkCurveMeasure.cpp File src/utils/SkCurveMeasure.cpp (right): https://codereview.chromium.org/2187083002/diff/160001/src/utils/SkCurveMeasure.cpp#newcode62 src/utils/SkCurveMeasure.cpp:62: Sk8f ArcLengthIntegrator::evaluateDerivativeLength(Sk8f ts) { Windows buildbots are giving me ...
4 years, 4 months ago (2016-08-02 21:33:21 UTC) #23
reed1
https://codereview.chromium.org/2187083002/diff/160001/src/utils/SkCurveMeasure.cpp File src/utils/SkCurveMeasure.cpp (right): https://codereview.chromium.org/2187083002/diff/160001/src/utils/SkCurveMeasure.cpp#newcode13 src/utils/SkCurveMeasure.cpp:13: ArcLengthIntegrator::ArcLengthIntegrator(const SkPoint* pts, SkSegType segType) : fSegType(segType) { exceed ...
4 years, 4 months ago (2016-08-02 21:46:23 UTC) #26
Harry Stern
https://codereview.chromium.org/2187083002/diff/160001/src/utils/SkCurveMeasure.cpp File src/utils/SkCurveMeasure.cpp (right): https://codereview.chromium.org/2187083002/diff/160001/src/utils/SkCurveMeasure.cpp#newcode13 src/utils/SkCurveMeasure.cpp:13: ArcLengthIntegrator::ArcLengthIntegrator(const SkPoint* pts, SkSegType segType) : fSegType(segType) { On ...
4 years, 4 months ago (2016-08-02 22:05:08 UTC) #27
mtklein
https://codereview.chromium.org/2187083002/diff/160001/src/utils/SkCurveMeasure.cpp File src/utils/SkCurveMeasure.cpp (right): https://codereview.chromium.org/2187083002/diff/160001/src/utils/SkCurveMeasure.cpp#newcode62 src/utils/SkCurveMeasure.cpp:62: Sk8f ArcLengthIntegrator::evaluateDerivativeLength(Sk8f ts) { On 2016/08/02 22:05:08, Harry Stern ...
4 years, 4 months ago (2016-08-02 22:32:35 UTC) #32
Harry Stern
On 2016/08/02 22:32:35, mtklein wrote: > https://codereview.chromium.org/2187083002/diff/160001/src/utils/SkCurveMeasure.cpp > File src/utils/SkCurveMeasure.cpp (right): > > https://codereview.chromium.org/2187083002/diff/160001/src/utils/SkCurveMeasure.cpp#newcode62 > ...
4 years, 4 months ago (2016-08-03 15:18:25 UTC) #33
Harry Stern
On 2016/08/03 15:18:25, Harry Stern wrote: > On 2016/08/02 22:32:35, mtklein wrote: > > > ...
4 years, 4 months ago (2016-08-03 16:04:51 UTC) #34
mtklein
On 2016/08/03 16:04:51, Harry Stern wrote: > On 2016/08/03 15:18:25, Harry Stern wrote: > > ...
4 years, 4 months ago (2016-08-03 16:16:14 UTC) #35
Harry Stern
I changed the benchmark to have a parameter which normalizes the number of inner loops ...
4 years, 4 months ago (2016-08-04 16:59:27 UTC) #36
reed1
lgtm w/ nits https://codereview.chromium.org/2187083002/diff/330001/src/utils/SkCurveMeasure.h File src/utils/SkCurveMeasure.h (right): https://codereview.chromium.org/2187083002/diff/330001/src/utils/SkCurveMeasure.h#newcode38 src/utils/SkCurveMeasure.h:38: public: nit: skia does not indent ...
4 years, 4 months ago (2016-08-05 21:49:08 UTC) #37
Harry Stern
https://codereview.chromium.org/2187083002/diff/330001/src/utils/SkCurveMeasure.h File src/utils/SkCurveMeasure.h (right): https://codereview.chromium.org/2187083002/diff/330001/src/utils/SkCurveMeasure.h#newcode38 src/utils/SkCurveMeasure.h:38: public: On 2016/08/05 21:49:08, reed1 wrote: > nit: skia ...
4 years, 4 months ago (2016-08-08 15:14:48 UTC) #38
Harry Stern
https://codereview.chromium.org/2187083002/diff/370001/gyp/utils.gypi File gyp/utils.gypi (right): https://codereview.chromium.org/2187083002/diff/370001/gyp/utils.gypi#newcode72 gyp/utils.gypi:72: '<(skia_src_path)/utils/SkShadowPaintFilterCanvas.cpp', These lines are here in both master and ...
4 years, 4 months ago (2016-08-08 15:18:48 UTC) #39
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/2187083002/370001
4 years, 4 months ago (2016-08-08 18:10:00 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: Build-Mac-Clang-x86_64-Release-GN-Trybot on master.client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Mac-Clang-x86_64-Release-GN-Trybot/builds/281)
4 years, 4 months ago (2016-08-08 18:14:55 UTC) #44
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/2187083002/390001
4 years, 4 months ago (2016-08-08 19:27:20 UTC) #51
commit-bot: I haz the power
4 years, 4 months ago (2016-08-08 19:28:17 UTC) #53
Message was sent while issue was closed.
Committed patchset #21 (id:390001) as
https://skia.googlesource.com/skia/+/0446a3c8e2a5f1d525b3e0595252e64c6cd3a753

Powered by Google App Engine
This is Rietveld 408576698