benjaminwagner
8e17556349
Change SkMatrix::fixedStepInX to return SkVector (of SkScalar) rather than SkFixed.
...
All users were immediately converting to SkScalar or SkFixed3232.
This method is not used in Chromium, Android, or Google3.
BUG=skia:4632
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1692013002
Review URL: https://codereview.chromium.org/1692013002
2016-02-16 10:09:40 -08:00
bsalomon
ef2c7c7057
Make SkMatrix::get*Scale[s]() fail on NaN
...
BUG=skia:4718
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1532963002
Review URL: https://codereview.chromium.org/1532963002
2015-12-17 15:33:13 -08:00
mtklein
b68ce74bd1
Add SK_BEGIN_REQUIRE_DENSE / SK_END_REQUIRE_DENSE.
...
Use in on a few examples of things we hash.
BUG=skia:
Review URL: https://codereview.chromium.org/1468483002
2015-11-24 05:35:58 -08:00
reed
021f631dc6
api helpers inspired by blink use-cases
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1278323002
2015-08-09 19:41:13 -07:00
robertphillips
07abbbec4b
Fix up SkMatrix::isFinite call
...
Review URL: https://codereview.chromium.org/1228473004
2015-07-06 12:15:34 -07:00
reed
71c3c760a8
add SkCanvas::drawAtlas
...
BUG=skia:
Review URL: https://codereview.chromium.org/1181913003
2015-06-24 10:29:18 -07:00
robertphillips
8b1fa6dd8d
Fix precision error in https://codereview.chromium.org/1188433011/
...
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1192853002
2015-06-19 06:40:02 -07:00
robertphillips
20eee3f047
Added check for ill-conditioned invert
...
sk_inv_determinant has a guard that the determinant can't get too big so this CL only checks if the determinant gets too small.
BUG=492263
Review URL: https://codereview.chromium.org/1188433011
2015-06-19 05:14:26 -07:00
reed
80ea19ca4b
Revert of Revert of stop calling SkScalarDiv (patchset #1 id:1 of https://codereview.chromium.org/1138263002/ )
...
Reason for revert:
android patched, blink has rolled
Original issue's description:
> Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/ )
>
> Reason for revert:
> need to wait for Blink roll (and patch android)
>
> Original issue's description:
> > stop calling SkScalarDiv
> >
> > BUG=skia:
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2629697933b5cc975e45d2a45c48f803fc6cbcec
TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1135693003
2015-05-12 10:37:34 -07:00
reed
2629697933
Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/ )
...
Reason for revert:
need to wait for Blink roll (and patch android)
Original issue's description:
> stop calling SkScalarDiv
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a
TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1138263002
2015-05-12 10:28:06 -07:00
reed
67d71c8982
stop calling SkScalarDiv
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1135053002
2015-05-12 09:47:22 -07:00
fmalita
f57546ec7f
Remove SK_SUPPORT_LEGACY_SCALAR_MAPPOINTS
...
No longer used in Chromium.
Also drop now-unused SkMatrix::Rot_pts() & SkMatrix::RotTrans_pts().
BUG=475022
R=reed@google.com ,mtklein@google.com
Review URL: https://codereview.chromium.org/1071833002
2015-04-09 06:13:15 -07:00
reed
7da19014fd
use Sk4f for matrix math
...
Need to land SK_SUPPORT_LEGACY_SCALAR_MAPPOINTS in chrome to suppress Affine
version which causes slight differences (which will need to be rebaselined)
BUG=skia:
Review URL: https://codereview.chromium.org/1045493002
2015-03-29 11:58:48 -07:00
reed
d8b34c26c2
use table of procs (and unrolling) to speed up mapPts
...
BUG=skia:
Review URL: https://codereview.chromium.org/1040783002
2015-03-27 14:00:41 -07:00
robertphillips
1d24b8dfe9
Add matrix constructing helpers to SkMatrix
...
Review URL: https://codereview.chromium.org/1034273002
2015-03-26 19:57:08 -07:00
reed
8010632f24
remove meaningless matrix benches, add mapPts() and add new benches
...
mapPts definitely faster than mapPoints (identity and perspective same speed). Up to 3x for large values of N.
cloned from https://codereview.chromium.org/1031443002/
BUG=skia:
Review URL: https://codereview.chromium.org/1030653002
2015-03-23 08:15:14 -07:00
reed
adf9990cb5
add SkMatrix::decomposeScale
...
BUG=skia:
Review URL: https://codereview.chromium.org/1006173005
2015-03-19 16:10:54 -07:00
reed
11fa2247b7
some utils for rect and matrix
...
BUG=skia:
Review URL: https://codereview.chromium.org/1003813003
2015-03-13 06:08:28 -07:00
reed
3f43f8ab9c
remove dead SkPersp macros
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/864713002
2015-01-20 19:58:36 -08:00
reed
451e822705
add get9 and set9 to matrix, to aid in making keys
...
BUG=skia:
TBR=
NOTREECHECKS=True
Review URL: https://codereview.chromium.org/806543002
2014-12-13 08:46:49 -08:00
mtklein
af57903f33
Force SkMatrix type while recording too.
...
This switches to a new way of doing this, enforcing the caching with the type
recorded rather than having to do it in SkRecorder. Should be more foolproof.
Updated SkPath and SkBitmap's equivalents too. ImmutableBitmap was close,
but using inheritance now makes the rest of the code less weird.
BUG=437511
I'm not sure whether or not this will _fix_ the SkMatrix aspect of that bug.
There may be other SkMatrices that we're racing on. It does cover the obvious
ones, though, and removing the SkTRacy<> wrapper will allow TSAN to show
us any other races.
It turned out to be easier to turn missing optional matrices into I early rather
than late. I figure this should be harmless. Recording and playback perf both
look neutral.
Review URL: https://codereview.chromium.org/773433003
2014-12-01 11:03:37 -08:00
robertphillips
9f2251c73e
Crop the fast path dashed lines to the cull rect
...
Without:
maxrss loops min median mean max stddev samples config bench
56M 1 13.3ms 13.6ms 13.6ms 14.2ms 2% Ooooo..... 8888 GM_dashing5_bw
56M 13 390us 417us 416us 459us 5% ooooO..o.o gpu GM_dashing5_bw
56M 1 13.4ms 13.9ms 14.1ms 15ms 3% Oooo..ooOo 8888 GM_dashing5_aa
56M 13 402us 421us 416us 425us 2% Ooo.ooOOOO gpu GM_dashing5_aa
With:
40M 1 1.53ms 1.54ms 1.54ms 1.55ms 0% oo.O...o.. 8888 GM_dashing5_bw
40M 12 407us 412us 415us 445us 3% ...Oo..... gpu GM_dashing5_bw
40M 1 1.7ms 1.7ms 1.7ms 1.72ms 0% o.O....... 8888 GM_dashing5_aa
43M 13 405us 409us 409us 415us 1% ooo.Ooo..o gpu GM_dashing5_aa
The GM images (including the new one) are the same with and without this CL.
BUG=428296
Review URL: https://codereview.chromium.org/699623003
2014-11-04 13:33:50 -08:00
junov
ed53742e92
Add SK_API to global scope operators of SkMatrix
...
Review URL: https://codereview.chromium.org/678153002
2014-10-28 07:14:58 -07:00
reed
2cc22b8f2f
make SkMatrix::dump always available
...
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/624783002
2014-10-02 17:52:03 -07:00
reed
d1f0ebd0e2
specialize setConcat for scale+translate
...
This reverts commit 2a382f5199
.
BUG=skia:
Review URL: https://codereview.chromium.org/626583002
2014-10-02 12:58:43 -07:00
robertphillips
2a382f5199
Revert of specialize setConcat for scale+translate (patchset #1 id:1 of https://codereview.chromium.org/620433002/ )
...
Reason for revert:
Experimental to see if this revert "fixes" nanobench on the main console.
Original issue's description:
> specialize setConcat for scale+translate, helps drawText perf
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e8db3ef2a2161084fa8eb1fd1d54c35bfff52d6c
TBR=jvanverth@google.com ,reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/620973003
2014-10-02 04:42:55 -07:00
reed
e8db3ef2a2
specialize setConcat for scale+translate, helps drawText perf
...
BUG=skia:
R=jvanverth@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/620433002
2014-09-30 07:24:47 -07:00
bsalomon
49f085dddf
"NULL !=" = NULL
...
R=reed@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/544233002
2014-09-05 13:34:00 -07:00
jvanverth
17a845f760
Fix matrix similarity test on arm64
...
Addresses precision issue by using a simpler test.
Also fixes issues with IvMatrix::preservesRightAngles, and adds unit tests.
BUG=skia:2405
R=robertphillips@google.com , egdaniel@google.com , djsollen@google.com , reed@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/520123002
2014-09-02 13:15:41 -07:00
mtklein
0b544ae222
Add SkRacy
...
SkRacy<T> is a zero-overhead wrapper for a T, except it also
silences race warnings when TSAN is running.
Here we apply in several classes. In SkMatrix and SkPathRef,
we use it to opportunistically cache some idempotent work.
In SkPixelRef, we wrap the genIDs. We think the worst that
can happen here is we'll increment the global next-genID a
few times instead of once when we go to get another ID.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/d5e3e6ae1b3434ad1158f441902ff65f1eeaa3a7
CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot,Canary-Chrome-Win7-Ninja-x86-SharedLib_ToT-Trybot,Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/371363004
2014-07-08 19:37:47 -07:00
mtklein
d3f3e5895e
Revert of Add SkRacy ( https://codereview.chromium.org/371363004/ )
...
Reason for revert:
hidden symbol 'AnnotateBenignRaceSized' in obj/base/third_party/dynamic_annotations/libdynamic_annotations.a(obj/base/third_party/dynamic_annotations/dynamic_annotations.dynamic_annotations.o) is referenced by DSO lib/libblink_platform.so
Original issue's description:
> Add SkRacy
>
> SkRacy<T> is a zero-overhead wrapper for a T, except it also
> silences race warnings when TSAN is running.
>
> Here we apply in several classes. In SkMatrix and SkPathRef,
> we use it to opportunistically cache some idempotent work.
>
> In SkPixelRef, we wrap the genIDs. We think the worst that
> can happen here is we'll increment the global next-genID a
> few times instead of once when we go to get another ID.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d5e3e6ae1b3434ad1158f441902ff65f1eeaa3a7
R=reed@google.com , mtklein@chromium.org
TBR=mtklein@chromium.org , reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/377693005
2014-07-08 14:06:46 -07:00
mtklein
d5e3e6ae1b
Add SkRacy
...
SkRacy<T> is a zero-overhead wrapper for a T, except it also
silences race warnings when TSAN is running.
Here we apply in several classes. In SkMatrix and SkPathRef,
we use it to opportunistically cache some idempotent work.
In SkPixelRef, we wrap the genIDs. We think the worst that
can happen here is we'll increment the global next-genID a
few times instead of once when we go to get another ID.
BUG=skia:
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/371363004
2014-07-08 12:30:39 -07:00
skia.committer@gmail.com
29de433b06
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@14817 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-21 03:05:49 +00:00
commit-bot@chromium.org
311a3cda94
Add function to get both min and max scale factors from matrix
...
R=reed@google.com , jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/298473002
git-svn-id: http://skia.googlecode.com/svn/trunk@14804 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-20 17:02:03 +00:00
commit-bot@chromium.org
1878651990
Rename SkMatrix::get(Max|Min)Stretch to get(Min|Max)Scale
...
R=reed@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/295713002
git-svn-id: http://skia.googlecode.com/svn/trunk@14798 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-20 14:53:45 +00:00
commit-bot@chromium.org
99bd7d8174
Try out SkMatrix::Concat.
...
This should RVO to the same as doing it on the stack with setConcat.
BUG=skia:
R=reed@google.com , mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/293693002
git-svn-id: http://skia.googlecode.com/svn/trunk@14782 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-19 15:51:12 +00:00
commit-bot@chromium.org
92362383a4
Remove SkCanvas matrix ops return value.
...
The internal SkMatrix ops can no longer fail -> we can remove the bool
return value.
R=bsalomon@google.com , reed@google.com , robertphillips@google.com , scroggo@google.com , fmalita@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/200223008
git-svn-id: http://skia.googlecode.com/svn/trunk@13849 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-18 12:51:48 +00:00
commit-bot@chromium.org
0f10f7bf1f
Allow toString capability to be toggled independent of developer mode.
...
This change is motivated by the desire to see the text information in the debugger when not in developer mode. It is structured so user's can disable it if the capability is not wanted.
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/197763008
git-svn-id: http://skia.googlecode.com/svn/trunk@13795 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-13 18:02:17 +00:00
reed@google.com
8f4d2306fa
remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats
...
To keep the CL (slightly) managable, this does not make any changes to
existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this
time around.
BUG=
R=bsalomon@google.com , caryclark@google.com
Review URL: https://codereview.chromium.org/117053002
git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-17 16:44:46 +00:00
commit-bot@chromium.org
cea9abb001
Do not use GrBicubic effect when downscaling. Also, don't use glTexStorage as it interferes with deleyed mipmap generation.
...
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/105353002
git-svn-id: http://skia.googlecode.com/svn/trunk@12576 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-09 19:15:37 +00:00
commit-bot@chromium.org
4faa869cda
Checking structure sizes before reading them from memory to avoid overflowing the buffer's stream.
...
BUG=
R=reed@google.com , mtklein@google.com , senorblanco@chromium.org
Committed: https://code.google.com/p/skia/source/detail?r=12114
Committed: https://code.google.com/p/skia/source/detail?r=12119
Author: sugoi@chromium.org
Review URL: https://codereview.chromium.org/41253002
git-svn-id: http://skia.googlecode.com/svn/trunk@12130 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-05 15:46:56 +00:00
reed@google.com
12a23866fe
Revert "Checking structure sizes before reading them from memory to avoid overflowing the buffer's stream."
...
This reverts commit 6bc22e8ef1ea70a1b58409aa21254358c50f149a.
git-svn-id: http://skia.googlecode.com/svn/trunk@12124 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-04 21:35:55 +00:00
sugoi@google.com
b48a59ae81
Checking structure sizes before reading them from memory to avoid overflowing the buffer's stream.
...
BUG=
R=reed@google.com
Committed: https://code.google.com/p/skia/source/detail?r=12114
Review URL: https://codereview.chromium.org/41253002
git-svn-id: http://skia.googlecode.com/svn/trunk@12119 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-04 20:28:23 +00:00
epoger@google.com
eb221268ab
Revert r12114 due to https://code.google.com/p/skia/issues/detail?id=1794 ('Assertion failures on various buildbots as of r12114')
...
git-svn-id: http://skia.googlecode.com/svn/trunk@12115 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-04 18:06:12 +00:00
sugoi@google.com
305f78e8c1
Checking structure sizes before reading them from memory to avoid overflowing the buffer's stream.
...
BUG=
R=reed@google.com
Review URL: https://codereview.chromium.org/41253002
git-svn-id: http://skia.googlecode.com/svn/trunk@12114 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-04 16:18:15 +00:00
egdaniel@google.com
259fbaf7a4
Add homogeneous point mapping to Matrix
...
Adds mapping of homogeneous points (points with three scalar components,
where the last component is not 1). Includes fix for tests when
running on 32 bit debug builds
BUG=
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/22816005
git-svn-id: http://skia.googlecode.com/svn/trunk@10755 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-15 21:12:11 +00:00
commit-bot@chromium.org
24ab3b0ce5
Add blend optimization helpers and use to convert rect draws to clears.
...
R=robertphillips@google.com , jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/22558003
git-svn-id: http://skia.googlecode.com/svn/trunk@10723 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-14 21:56:37 +00:00
jvanverth@google.com
f6ad1e8a06
Revert r10659: Add a map homogenous points to SkMatrix
...
git-svn-id: http://skia.googlecode.com/svn/trunk@10667 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-09 21:06:38 +00:00
egdaniel@google.com
2fae54d945
Add a map homogenous points to SkMatrix
...
BUG=
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/22330004
git-svn-id: http://skia.googlecode.com/svn/trunk@10659 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-09 15:07:10 +00:00
bsalomon@google.com
75796db3b3
Revert "Add blend optimization helpers and use to convert rect draws to clears."
...
This reverts commit r10537.
git-svn-id: http://skia.googlecode.com/svn/trunk@10601 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-07 13:34:14 +00:00