<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Introducing the layer based SVG engine on Nikolas Zimmermann</title>
    <link>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/</link>
    <description>Recent content in Introducing the layer based SVG engine on Nikolas Zimmermann</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title></title>
      <link>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-1/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-1/</guid>
      <description>&lt;div id=&#34;motivation&#34; class=&#34;nz-section-head&#34;&gt;
  &lt;h2&gt;&lt;ol&gt;
&lt;li&gt;Motivation&lt;/li&gt;
&lt;/ol&gt;
&lt;/h2&gt;
  &lt;a class=&#34;nz-section-toclink&#34; href=&#34;../../#toc&#34;&gt;&amp;uarr; Table Of Contents&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;In 2005, when the SVG support from ksvg2 was integrated into WebKit, the state of
the WebKit rendering engine was dramatically different. There was no support for transformations,
only basic rectangular clipping, no masking, no filters, etc. since these features simply
did not exist yet for HTML/CSS. All length information related to the CSS box model, such as
position/size of a box, were represented as integers - which was obviously not enough for SVG.&lt;/p&gt;</description>
    </item>
    <item>
      <title></title>
      <link>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-2/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-2/</guid>
      <description>&lt;div id=&#34;key-concepts&#34; class=&#34;nz-section-head&#34;&gt;
  &lt;h2&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Key concepts&lt;/li&gt;
&lt;/ol&gt;
&lt;/h2&gt;
  &lt;a class=&#34;nz-section-toclink&#34; href=&#34;../../#toc&#34;&gt;&amp;uarr; Table Of Contents&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;For those not familiar with WebKit this chapter introduces the &lt;strong&gt;DOM/Render/Layer Tree&lt;/strong&gt; concepts
and their applications in a short form. This is not aimed to be complete in any way, only the
minimum is introduced to form a basis for further discussions.&lt;/p&gt;</description>
    </item>
    <item>
      <title></title>
      <link>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-3/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-3/</guid>
      <description>&lt;div id=&#34;html-css-painting&#34; class=&#34;nz-section-head&#34;&gt;
  &lt;h2&gt;&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;HTML/CSS painting&lt;/li&gt;
&lt;/ol&gt;
&lt;/h2&gt;
  &lt;a class=&#34;nz-section-toclink&#34; href=&#34;../../#toc&#34;&gt;&amp;uarr; Table Of Contents&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;In the last sections the &lt;a href=&#34;../3#webkit-intro-render-tree&#34;&gt;&lt;strong&gt;Render Tree&lt;/strong&gt;&lt;/a&gt; and &lt;a href=&#34;../3#webkit-intro-layer-tree&#34;&gt;&lt;strong&gt;Layer Tree&lt;/strong&gt;&lt;/a&gt; concepts were introduced and briefly discussed.
It was illustrated how painting a document boils down to painting its root layer, which then propagates the paint request down the &lt;strong&gt;Layer Tree&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title></title>
      <link>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-4/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-4/</guid>
      <description>&lt;div id=&#34;svg-painting&#34; class=&#34;nz-section-head&#34;&gt;
  &lt;h2&gt;&lt;ol start=&#34;4&#34;&gt;
&lt;li&gt;SVG painting&lt;/li&gt;
&lt;/ol&gt;
&lt;/h2&gt;
  &lt;a class=&#34;nz-section-toclink&#34; href=&#34;../../#toc&#34;&gt;&amp;uarr; Table Of Contents&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;SVG painting in WebKit is much simpler, as the &lt;strong&gt;Layer Tree&lt;/strong&gt; is not used for SVG at all. SVG 1.1 had no means to change
the painting-order &amp;ndash; it&amp;rsquo;s identical to the document order. Therefore the layered painting approach was neglected
for SVG in the early ksvg2 days. Remember at this point in time HTML/CSS did not even support transformations, filters, etc.&lt;/p&gt;</description>
    </item>
    <item>
      <title></title>
      <link>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-5/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-5/</guid>
      <description>&lt;div id=&#34;legacy-engine-intro&#34; class=&#34;nz-section-head&#34;&gt;
  &lt;h2&gt;&lt;ol start=&#34;5&#34;&gt;
&lt;li&gt;Legacy SVG engine&lt;/li&gt;
&lt;/ol&gt;
&lt;/h2&gt;
  &lt;a class=&#34;nz-section-toclink&#34; href=&#34;../../#toc&#34;&gt;&amp;uarr; Table Of Contents&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Almost two decades since its introduction the legacy SVG engine shows its age. Today&amp;rsquo;s Web world is dominated by HTML/CSS. They are actively
developed, have strong communities and vendor support. SVG should be a first-class citizen in the HTML/CSS world &amp;ndash; no one should need to use
animated CSS masks combined with &lt;strong&gt;&amp;lsquo;border-radius&amp;rsquo;&lt;/strong&gt; to simulate animated circles, just because animating SVGs itself is too expensive.&lt;/p&gt;</description>
    </item>
    <item>
      <title></title>
      <link>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-6/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-6/</guid>
      <description>&lt;div id=&#34;lbse-intro&#34; class=&#34;nz-section-head&#34;&gt;
  &lt;h2&gt;&lt;ol start=&#34;6&#34;&gt;
&lt;li&gt;Layer-based SVG engine&lt;/li&gt;
&lt;/ol&gt;
&lt;/h2&gt;
  &lt;a class=&#34;nz-section-toclink&#34; href=&#34;../../#toc&#34;&gt;&amp;uarr; Table Of Contents&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;So what does it take to let SVG participate in the &lt;strong&gt;Layer Tree&lt;/strong&gt;? Short answer: Many things.&lt;/p&gt;
&lt;p&gt;First of all, the nodes marked in &lt;span style=&#34;background-color: #ff7c9b&#34;&gt;red&lt;/span&gt; in the &lt;a href=&#34;../6#legacy-class-hierarchy&#34;&gt;class hierarchy diagram&lt;/a&gt; need to be reworked: &lt;strong&gt;RenderSVGModelObject&lt;/strong&gt;
needs to inherit from &lt;strong&gt;RenderLayerModelObject&lt;/strong&gt;, in order to deal with &lt;strong&gt;RenderLayer&lt;/strong&gt;. Furthermore every code path dealing with &lt;strong&gt;RenderLayer&lt;/strong&gt; needs to be adapted to handle the first
non-RenderBox derived renderer that makes use of layers: &lt;strong&gt;RenderSVGModelObject&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title></title>
      <link>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-7/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-7/</guid>
      <description>&lt;div id=&#34;svg-poc-patch&#34; class=&#34;nz-section-head&#34;&gt;
  &lt;h2&gt;&lt;ol start=&#34;7&#34;&gt;
&lt;li&gt;SVG PoC patch&lt;/li&gt;
&lt;/ol&gt;
&lt;/h2&gt;
  &lt;a class=&#34;nz-section-toclink&#34; href=&#34;../../#toc&#34;&gt;&amp;uarr; Table Of Contents&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;The bug report &lt;a href=&#34;https://bugs.webkit.org/show_bug.cgi?id=90738&#34;&gt;#90738 &lt;strong&gt;Harmonize HTML/SVG rendering&lt;/strong&gt;&lt;/a&gt; - dating back to &lt;strong&gt;2012&lt;/strong&gt; -
contains the latest revision of a &lt;strong&gt;single patch&lt;/strong&gt; that &lt;em&gt;replaces&lt;/em&gt; the legacy SVG engine with the layer based SVG engine.&lt;/p&gt;</description>
    </item>
    <item>
      <title></title>
      <link>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-8/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-chapter-8/</guid>
      <description>&lt;div id=&#34;conclusions&#34; class=&#34;nz-section-head&#34;&gt;
  &lt;h2&gt;&lt;ol start=&#34;8&#34;&gt;
&lt;li&gt;Conclusions&lt;/li&gt;
&lt;/ol&gt;
&lt;/h2&gt;
  &lt;a class=&#34;nz-section-toclink&#34; href=&#34;../../#toc&#34;&gt;&amp;uarr; Table Of Contents&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;I&amp;rsquo;ll keep the conclusions short: I hope that the design of the layer based SVG engine is now easier to follow for anyone and that we
can agree that this is the right way to go. The introduction of the layer based SVG engine is the first step towards a modern SVG engine,
not the final solution. There are many areas that need to be improved in WebKits SVG implementation: the whole SVG resources system, the
inefficient SVG text rendering system (my fault), etc.. Hopefully the support of hardware accelerated compositing makes SVG attractive
for Web developers seeking to produce fluent animations, beautiful UIs, etc.&lt;/p&gt;</description>
    </item>
    <item>
      <title></title>
      <link>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-introduction/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://blogs.igalia.com/nzimmermann/posts/2021-10-29-layer-based-svg-engine/design-document-introduction/</guid>
      <description>&lt;br/&gt;
&lt;h3 style=&#34;text-align: center;&#34;&gt;- Technical design document -&lt;/h3&gt;
&lt;br/&gt;


&lt;p&gt;In this document an improved SVG rendering approach is presented that unifies the HTML/CSS
and SVG rendering pipelines that were traditionally separated in WebKit (see &lt;a href=&#34;https://blogs.igalia.com/nzimmermann/posts/2019-12-12-3d-transformations/&#34;&gt;here&lt;/a&gt; for background information).&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
