Florin Malita
e1dadd74f8
[SVGDom] Add 'stroke-dashoffset' support
...
https://www.w3.org/TR/SVG/painting.html#StrokeDashoffsetProperty
Change-Id: Ia25d0048a56ac3835cabcb4e1794d91667367d7c
Reviewed-on: https://skia-review.googlesource.com/59820
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-10-13 22:53:32 +00:00
Florin Malita
f543a60ef0
[SVGDom] Add 'stroke-dasharray' support
...
https://www.w3.org/TR/SVG/painting.html#StrokeDasharrayProperty
Change-Id: I9a63ebbd958d661c865ed405570b86cca68f63bf
Reviewed-on: https://skia-review.googlesource.com/59700
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-13 19:14:39 +00:00
Florin Malita
ffe6ae49e4
[SVGDom] Add 'visibility' support
...
https://www.w3.org/TR/SVG/painting.html#VisibilityProperty
Change-Id: I8b872af26150d93cf39cf8eeba23c91e1decace3
Reviewed-on: https://skia-review.googlesource.com/58863
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-10-12 17:06:34 +00:00
Florin Malita
1aa1bb65fd
[SVGDom] Initial <pattern> support
...
https://www.w3.org/TR/SVG/pservers.html#Patterns
Change-Id: I80455c4ae04cf03526f8e8797f40b0b2d24e043f
Reviewed-on: https://skia-review.googlesource.com/58461
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-11 18:56:38 +00:00
Florin Malita
6a69c053ff
[SVGDom] Initial <use> support
...
https://www.w3.org/TR/SVG/struct.html#UseElement
Change-Id: Id85c2648255dcd4763bf11c7bdb8b1490286f1e4
Reviewed-on: https://skia-review.googlesource.com/58260
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-11 18:21:37 +00:00
Florin Malita
57a0edf7ba
[SVGDom] Add clip-rule support
...
Currently we use 'fill-rule' when emitting clip paths. This is wrong:
per spec [1], clip paths observe 'clip-rule', not 'fill-rule'.
[1] https://www.w3.org/TR/SVG/masking.html#ClipRuleProperty
Change-Id: Idf81de05e9601663c8dbc9856900ffa679daf4a5
Reviewed-on: https://skia-review.googlesource.com/57661
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-10-10 19:23:23 +00:00
Florin Malita
cc6cc2963b
[SVGDom] Radial gradient support
...
Implement support for
https://www.w3.org/TR/SVG/pservers.html#RadialGradients .
BUG=skia:7074
Change-Id: I19645a4a3bbddfd1ee0d08a2775381a0017acbfc
Reviewed-on: https://skia-review.googlesource.com/57340
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-09 20:26:54 +00:00
Florin Malita
ce8840e384
[SVGDom] ClipPath support
...
* clip-path attribute handling
* clipPath container element
* asPath() SkSVGNode virtual for capturing subtree geometry
R=robertphillips@google.com ,stephana@google.com
Change-Id: I9597534fe3047b631da6309eafac055dff5696e9
Reviewed-on: https://skia-review.googlesource.com/5650
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2016-12-08 15:00:18 +00:00
Florin Malita
e932d4b3a9
[SVGDom] Add fill-rule support
...
There's a bit of friction with this attribute, because per spec it is
an inherited presentation attribute, but in Skia it is part of the
actual SkPath state.
So we must add some plumbing to SkSVGShape & friends to allow overriding
the fill type at render-time.
R=robertphillips@google.com ,stephana@google.com
Change-Id: I9c926d653c6211beb3914bffac50d4349dbdd2c0
Reviewed-on: https://skia-review.googlesource.com/5415
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2016-12-06 16:05:41 +00:00
fmalita
bef51c23c3
[SVGDom] Opacity optimization
...
Apply opacity as fill/stroke paint alpha instead of saveLayer, when
possible.
R=robertphillips@google.com ,stephana@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353503005
Committed: https://skia.googlesource.com/skia/+/3dbb7b9f196d793fbd16243157ee67638891f5dc
Review-Url: https://codereview.chromium.org/2353503005
2016-09-20 15:45:57 -07:00
borenet
a5344ee50a
Revert of [SVGDom] Opacity optimization (patchset #4 id:60001 of https://codereview.chromium.org/2353503005/ )
...
Reason for revert:
Failing assertion
Original issue's description:
> [SVGDom] Opacity optimization
>
> Apply opacity as fill/stroke paint alpha instead of saveLayer, when
> possible.
>
> R=robertphillips@google.com ,stephana@google.com,reed@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353503005
>
> Committed: https://skia.googlesource.com/skia/+/3dbb7b9f196d793fbd16243157ee67638891f5dc
TBR=reed@google.com ,robertphillips@google.com,stephana@google.com,fmalita@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2359603002
2016-09-20 13:39:46 -07:00
fmalita
3dbb7b9f19
[SVGDom] Opacity optimization
...
Apply opacity as fill/stroke paint alpha instead of saveLayer, when
possible.
R=robertphillips@google.com ,stephana@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353503005
Review-Url: https://codereview.chromium.org/2353503005
2016-09-20 12:44:31 -07:00
fmalita
28d5b72d86
[SVGDom] Initial linear gradient support
...
Kind of a big change, to connect several new bits into something useful:
* ID tracking & lookup
* new asPaint() node virtual to support shader (and in the future filter) based paint servers
* <defs>, <linearGradient> and <stop> element support
* 'href', 'offset', 'stop-color', 'stop-opacity' attribute support
* IRI/FuncIRI and rgb(...) parsing
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2327233003
Review-Url: https://codereview.chromium.org/2327233003
2016-09-12 17:06:47 -07:00
fmalita
d24ee1419f
[SVGDom] Add <line> support
...
R=robertphillips@google.com ,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2244223005
Review-Url: https://codereview.chromium.org/2244223005
2016-08-17 08:38:15 -07:00
fmalita
dc4c2a9fb7
[SVGDom] Add <circle>, <ellipse> support
...
R=robertphillips@google.com ,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249033003
Review-Url: https://codereview.chromium.org/2249033003
2016-08-16 15:38:51 -07:00
fmalita
6fb0648c35
[SVGDom] Add opacity support
...
Group opacity support. Unlike the other presentation attributes we
support thus far, group opacity is not inherited.
R=robertphillips@google.com ,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246943002
Review-Url: https://codereview.chromium.org/2246943002
2016-08-15 12:45:11 -07:00
fmalita
ca39d716f1
[SVGDom] SVGPong sample app
...
Shows off SVG dom-based animations.
R=robertphillips@google.com ,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243853003
Review-Url: https://codereview.chromium.org/2243853003
2016-08-12 13:17:11 -07:00
fmalita
5b31f321fc
[SVGDom] <polygon> & <polyline> support
...
R=robertphillips@google.com ,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2235273003
Review-Url: https://codereview.chromium.org/2235273003
2016-08-12 12:15:33 -07:00
fmalita
397a517d1a
[SVGDom] Add viewBox support
...
The main feature is <svg> viewBox and proper viewport support, but the CL
touches a few other things:
* refactor SkSVGRenderContext to auto-restore canvas state, and split the
presentation bits into a separate CoW SkSVGPresentationContext
* introduce SkSVGNode::onPrepareToRender(), as a way for nodes to push their
custom state before the actual onRender() call (instead of relying on
non-virtual SkSVGNode to know about all possible state bits)
* add a "Type" suffix to SVG types, to disambiguate (e.g. SkSVGRectType vs.
SkSVGRect)
R=robertphillips@google.com ,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222793002
Review-Url: https://codereview.chromium.org/2222793002
2016-08-08 11:38:55 -07:00
fmalita
bffc256687
[SVGDom] Initial SVGLength support
...
Mostly plumb new length types, but also introduce a stateful parser,
rect shape and named color support.
R=reed@google.com ,robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202053002
Review-Url: https://codereview.chromium.org/2202053002
2016-08-03 10:21:11 -07:00
fmalita
58649ccc75
[SVGDom] Parse style attributes
...
Dispatch style-encoded (style="foo: bar; ...") attributes via normal
attribute setters.
R=reed@google.com ,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193663002
Review-Url: https://codereview.chromium.org/2193663002
2016-07-29 08:52:03 -07:00
fmalita
6ceef3dd67
Initial SVG model
...
A minimal subset needed to render tiger.svg: <svg>, <g>, <path>, 'd', 'fill'/'stroke' (color-only), 'transform'.
R=reed@google.com ,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164193002
Review-Url: https://codereview.chromium.org/2164193002
2016-07-26 18:46:34 -07:00