aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkCurveMeasure.cpp
Commit message (Collapse)AuthorAge
* Wrap SkNx types in anonymous namespace again.Gravatar Mike Klein2016-10-14
| | | | | | | | | | | | | | | | | | | | | This should make each compilation unit's SkNx types distinct from each other's as far as C++ cares. This keeps us from violating the One Definition Rule with different implementations for the same function. Here's an example I like. Sk4i SkNx_cast(Sk4b) has at least 4 different sensible implementations: - SSE2: punpcklbw xmm, zero; punpcklbw xmm, zero - SSSE3: load mask; pshufb xmm, mask - SSE4.1: pmovzxbd - AVX2: vpmovzxbd We really want all these to inline, but if for some reason they don't (Debug build, poor inliner) and they're compiled in SkOpts.cpp, SkOpts_ssse3.cpp, SkOpts_sse41.cpp, SkOpts_hsw.cpp... boom! BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3461 Change-Id: I0088ebfd7640c1b0de989738ed43c81b530dc0d9 Reviewed-on: https://skia-review.googlesource.com/3461 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix bug in cubic derivative coefficient with missing parensGravatar hstern2016-08-16
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2242603002 Review-Url: https://codereview.chromium.org/2242603002
* Add better bounds checks for getTime to fix perf debug assert belowGravatar hstern2016-08-10
| | | | | | | | | | | | | | | | Due to rounding, we request a length slightly larger than the total length in MeasureBench. This will be fixed in a following CL and there will be another CL adding unit tests for bounds checking and other problems. Revert "Revert 386ba54 and 4ab47e0 : perf debug assert." This reverts commit 69aaa5a49a10454d573cbd8c5d980029d78ae459. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233983003 Review-Url: https://codereview.chromium.org/2233983003
* Revert 386ba54 and 4ab47e0 : perf debug assert.Gravatar halcanary2016-08-10
| | | | | | | | | | | | | | | | Revert "Refactor SkCurveMeasure to use existing eval code" This reverts commit 4ab47e087ecfc82f070cbbaef4d9eb562d3fd163. Revert "Fastpath lines in SkCurveMeasure" This reverts commit 386ba540612defc7808edc28126b9b8afcf45b89. TBR= NOTRY=true GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233683004 Review-Url: https://codereview.chromium.org/2233683004
* Fastpath lines in SkCurveMeasureGravatar hstern2016-08-10
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2229403004 Review-Url: https://codereview.chromium.org/2229403004
* Refactor SkCurveMeasure to use existing eval codeGravatar hstern2016-08-10
| | | | | | | | | | - Use quad, cubic, conic eval code from SkGeometry.h - Implement evaluateDerivativeLength, evaluateDerivative and evaluate switch cases for lines along with the refactor BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226973004 Review-Url: https://codereview.chromium.org/2226973004
* Add time return argument to SkCurveMeasure's getPosTan, rename to getPosTanTimeGravatar hstern2016-08-10
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2229893002 Review-Url: https://codereview.chromium.org/2229893002
* Add initial CurveMeasure codeGravatar hstern2016-08-08
- 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 Review-Url: https://codereview.chromium.org/2187083002