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
commit-bot@chromium.org
c1cdf21ab8
Add blend optimization helpers and use to convert rect draws to clears.
...
Committed: http://code.google.com/p/skia/source/detail?r=10537
R=robertphillips@google.com , jvanverth@google.com , reed@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/21877006
git-svn-id: http://skia.googlecode.com/svn/trunk@10562 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-06 15:07:23 +00:00
bsalomon@google.com
9b6a185e36
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@10542 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-05 18:27:23 +00:00
commit-bot@chromium.org
66017f6cc5
Add blend optimization helpers and use to convert rect draws to clears.
...
R=robertphillips@google.com , jvanverth@google.com , reed@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/21877006
git-svn-id: http://skia.googlecode.com/svn/trunk@10537 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-05 16:55:55 +00:00
robertphillips@google.com
df3695e5c7
First pass at Rect Effect
...
https://codereview.chromium.org/13521006/
git-svn-id: http://skia.googlecode.com/svn/trunk@8571 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-09 14:01:44 +00:00
jvanverth@google.com
46d3d39e65
Add GPU support for axis-aligned ovals:
...
- Add drawOval base function to SkDevice, and override in SkGpuDevice
- Move isSimilarityMatrix to SkMatrix (renamed to isSimilarity) and fixed up unit test
- Since both SkGpuDevice::drawOval() and GrContext::drawPath() can try to draw ovals, added GrContext::canDrawOval() and GrContext::internalDrawOval() to avoid duplicate code
- Hooked in axis-aligned oval fill shader
- Enabled GPU stroked circles
- Added stroked circle bench test
Review URL: https://codereview.appspot.com/7137050
git-svn-id: http://skia.googlecode.com/svn/trunk@7304 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-22 13:34:01 +00:00
robertphillips@google.com
76f9e938df
Added print out of SkShader information to debugger
...
https://codereview.appspot.com/7105045/
git-svn-id: http://skia.googlecode.com/svn/trunk@7201 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-15 20:17:47 +00:00
bsalomon@google.com
7b7cdd147f
Some improvements to reduce the number of pixels touched in generating alpha clip masks
...
Review URL: https://codereview.appspot.com/6828043
git-svn-id: http://skia.googlecode.com/svn/trunk@6329 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-07 16:17:24 +00:00
bsalomon@google.com
683c3c76cf
Shortcut inverting the identity matrix.
...
Review URL: https://codereview.appspot.com/6775087/
git-svn-id: http://skia.googlecode.com/svn/trunk@6218 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-31 16:50:38 +00:00
rmistry@google.com
fbfcd56021
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/ )
...
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054
git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 18:09:54 +00:00
bsalomon@google.com
fd4c00eb36
Fix SkMatrix.h line endings (LF) [change 4592 fixed the cpp]
...
git-svn-id: http://skia.googlecode.com/svn/trunk@4594 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 14:39:51 +00:00
junov@chromium.org
02662b7feb
Fixing bad assertion test that was trippin-up debug buildbots
...
TBR=http://codereview.appspot.com/6344109
git-svn-id: http://skia.googlecode.com/svn/trunk@4569 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-12 14:44:52 +00:00