aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/svg/model/SkSVGRenderContext.h
Commit message (Collapse)AuthorAge
* [SVGDom] Initial <pattern> supportGravatar Florin Malita2017-10-11
| | | | | | | | | 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>
* [SVGDom] Avoid some unneeded canvas save()sGravatar Florin Malita2017-10-11
| | | | | | | | | | | The canvas only needs to be saved once, per local SkSVGRenderContext. Add a helper (saveOnce) to implement this optimization. Change-Id: I0c21fa78ad9fd5d3d11de0a29f8441620488d676 Reviewed-on: https://skia-review.googlesource.com/58340 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* [SVGDom] Clipped clipPath supportGravatar Florin Malita2016-12-09
| | | | | | | | | | | | | | | | | ClipPaths can be clipped too, e.g.: <clipPath id="clip1" clip-path="url(#clip2)">...</clipPath> Since we're not really drawing clips but resolving their geometry, asPath() needs to take composed clipping into account (and intersect as needed). R=reed@google.com,robertphillips@google.com,stephana@google.com Change-Id: I25959e22fe50f72042147cfe6b416b6b9ac20cd4 Reviewed-on: https://skia-review.googlesource.com/5720 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [SVGDom] ClipPath supportGravatar Florin Malita2016-12-08
| | | | | | | | | | | | | * 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>
* [SVGDom] Add fill-rule supportGravatar Florin Malita2016-12-06
| | | | | | | | | | | | | | | | 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>
* [SVGDom] Opacity optimizationGravatar fmalita2016-09-20
| | | | | | | | | | | 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
* Revert of [SVGDom] Opacity optimization (patchset #4 id:60001 of ↵Gravatar borenet2016-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [SVGDom] Opacity optimizationGravatar fmalita2016-09-20
| | | | | | | | | | 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
* [SVGDom] Initial linear gradient supportGravatar fmalita2016-09-12
| | | | | | | | | | | | | | | 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
* [SVGDom] Add support for assorted absolute unitsGravatar fmalita2016-08-17
| | | | | | | R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259473002 Review-Url: https://codereview.chromium.org/2259473002
* [SVGDom] Add more presentation attributes.Gravatar fmalita2016-08-11
| | | | | | | | | | | | | | | | Implement proper presentation attribute inheritance, and add support for * fill-opacity * stroke-linecap * stroke-linejoin * stroke-opacity * stroke-width R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234153002 Review-Url: https://codereview.chromium.org/2234153002
* [SVGDom] Add viewBox supportGravatar fmalita2016-08-08
| | | | | | | | | | | | | | | | | | | | 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
* [SVGDom] Initial SVGLength supportGravatar fmalita2016-08-03
| | | | | | | | | | 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
* Initial SVG modelGravatar fmalita2016-07-26
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