<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

  <channel>
    <title>Woohoo</title>
    <link>http://abandonedwig.info</link>
    <atom:link href="http://abandonedwig.info/blog/rss.xml" rel="self" type="application/rss+xml" />
    <description>Abandoned Wig blog</description>
    <language>en-us</language>
    <pubDate>Mon, 25 Feb 2013 19:56:21 EST</pubDate>
    <lastBuildDate>Mon, 25 Feb 2013 19:56:21 EST</lastBuildDate>

    
    
      <item>
        <title>Edge-distance anti-aliasing</title>
        <link>http://abandonedwig.info/blog/2013/02/24/edge-distance-anti-aliasing.html</link>
        <pubDate>Sun, 24 Feb 2013 00:00:00 EST</pubDate>
        <name>Martin Robinson (Martin Robinson)</name>
        <guid>http://abandonedwig.info/blog/2013/02/24/edge-distance-anti-aliasing.html</guid>
        <description>&lt;p&gt;(You might want to go &lt;a href='http://abandonedwig.info/edge-distance-anti-aliasing/demo.html'&gt;straight to the demo&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Some months ago, I noticed that the &lt;a href='http://src.chromium.org/viewvc/chrome/trunk/src/cc/'&gt;Chromium compositor&lt;/a&gt;, the code which powers Chromium&amp;#8217;s accelerated compositing implementation (and also &lt;a href='http://code.google.com/p/chromium/wiki/Aura'&gt;Aura!&lt;/a&gt;) was anti-aliasing layer edges. This was especially surprising to me since I knew for a fact that my hardware didn&amp;#8217;t support &lt;a href='http://en.wikipedia.org/wiki/Multisample_anti-aliasing'&gt;multisample anti-aliasing&lt;/a&gt; yet. Some people from the Chromium graphics team, who are incredibly friendly and helpful, pointed me to a very clever bit of code they were using to do edge-distance anti-aliasing for composited layers.&lt;/p&gt;

&lt;p&gt;&lt;a href='http://en.wikipedia.org/wiki/Aliasing'&gt;Aliasing&lt;/a&gt; can happen when you sample a signal that has details that cannot be captured by your sample frequency. In the case of graphics, it&amp;#8217;s what happens when features of the image exist in an area smaller than a pixel. One important feature is the edge of a piece of geometry, such as the edge of a shape drawn onto the page. When you start rotating shapes and projecting them with 3D CSS transforms, geometry that before aligned to pixel boundaries can move to the spaces between pixel boundaries.&lt;/p&gt;

&lt;p&gt;For instance, let&amp;#8217;s zoom into the edge of triangle that we are rendering. Maybe in this case it&amp;#8217;s half of a rotated div.&lt;/p&gt;

&lt;p&gt;&lt;img alt='A polygon without anti-aliasing' src='http://abandonedwig.info/edge-distance-anti-aliasing/no-antialiasing-final.png' /&gt;&lt;/p&gt;

&lt;p&gt;If we naively decided the color of every pixel based on whether any of the triangle covered it at all, we&amp;#8217;d end up with a jagged edge.&lt;/p&gt;

&lt;p&gt;One thing we could do to make the edge smooth is to determine how much area of the pixel is covered by the triangle. We could adjust the transparency of the shape color (the alpha value) by that percentage when painting the pixel. This process is a type of &lt;i&gt;anti-aliasing&lt;/i&gt; and the percentage that the triangle covers the pixel is called &lt;i&gt;coverage&lt;/i&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img alt='A polygon with anti-aliasing' src='http://abandonedwig.info/edge-distance-anti-aliasing/antialiasing-final.png' /&gt;&lt;/p&gt;

&lt;p&gt;Think of all the complicated geometric calculations we&amp;#8217;d have to do to figure out the ratio exactly. Since we have to make these calculations for every pixel up to 60 times per second (for smooth animations), our rendering would be pretty slow if we actually did them! Instead, it&amp;#8217;d be nice if we could somehow estimate how much of the pixel is covered and do less work. One approach is to calculate the distance from the pixel to the edge of the shape. If the pixel is more than one pixel&amp;#8217;s distance away from the edge, we know that we should not paint the triangle color at all. If the pixel is closer than one one pixel&amp;#8217;s distance from the edge, we should paint the triangle color, but reduced by some transparency factor.&lt;/p&gt;

&lt;p&gt;Luckily, OpenGL can run a little program for every pixel &lt;a href='#fn1'&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; it paints. This program is called a fragment shader. We can write up this logic in the fragment shader and change the triangle color for every pixel.&lt;/p&gt;

&lt;p&gt;Perhaps some of those reading who have had experience with OpenGL may notice here that this isn&amp;#8217;t going to work as I&amp;#8217;ve described. OpenGL already does something like the naive approach I talked about first. Some pixels (the ones OpenGL decided should be painted with the triangle color), will be properly anti-aliased, but many pixels will not be painted at all. For instance, if the coverage of the pixel is only 20% and OpenGL decided not to paint it, we wouldn&amp;#8217;t even have a chance to determine how far it was from the triangle edge, because the fragment shader wouldn&amp;#8217;t run for those missing pixels.&lt;/p&gt;

&lt;p&gt;Let&amp;#8217;s &amp;#8220;trick&amp;#8221; OpenGL into painting more pixels than it would otherwise. A simple way to do this is to just make the triangle a little bit bigger. In fact, we can expand all the edges by less than one pixel and OpenGL will paint all those missing pixels. Now we have smooth edges!&lt;/p&gt;

&lt;p&gt;&lt;img alt='Expanding the drawing area' src='http://abandonedwig.info/edge-distance-anti-aliasing/antialiasing-final-expanded.png' /&gt;&lt;/p&gt;

&lt;p&gt;I spent some time implementing this for the TextureMapper accelerated compositor (and thus WebKitGTK+), so it&amp;#8217;s not just the Chromium compositor that has this feature any longer. For me it makes a huge difference in the quality of 3D CSS content. For the purposes of demonstration, I&amp;#8217;ve also reimplemented it in WebGL, so if you have a modern browser you can &lt;a href='http://abandonedwig.info/edge-distance-anti-aliasing/demo.html'&gt;see it in action&lt;/a&gt;.&lt;/p&gt;
&lt;a href='http://abandonedwig.info/edge-distance-anti-aliasing/demo.html'&gt;&lt;img alt='A screenshot of the edge-distance anti-aliasing demo' src='http://abandonedwig.info/edge-distance-anti-aliasing/demo.png' /&gt;&lt;/a&gt;&lt;ol class='footnotes'&gt;
     &lt;li&gt;&lt;a name='fn1' /&gt; Fragments and pixels are actually different things, but I'm glossing over this difference for the sake of simplicity.&lt;/li&gt;
&lt;/ol&gt;</description>
      </item>
    
    
    
      <item>
        <title>Accelerated compositing update</title>
        <link>http://abandonedwig.info/blog/2012/07/07/accelerated-compositing-update.html</link>
        <pubDate>Sat, 07 Jul 2012 00:00:00 EDT</pubDate>
        <name>Martin Robinson (Martin Robinson)</name>
        <guid>http://abandonedwig.info/blog/2012/07/07/accelerated-compositing-update.html</guid>
        <description>&lt;div class='post'&gt;
I believe it's past time to break the silence here, so what follows is a short update on the progress we've made at &lt;a href=&quot;http://igalia.com/&quot;&gt;Igalia&lt;/a&gt; toward 3D CSS transforms and hardware accelerated animation in WebKitGTK+ (otherwise known as accelerated compositing). I'm happy to say that both the initial WebKit1 and WebKit2 implementation of this work have &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=86037&quot;&gt;finally landed&lt;/a&gt;, and you can try it out now in the latest unstable releases. Epiphany in Gnome 3.6 will include accelerated compositing (smooth animations and fast WebGL), a port to the brand new WebKit2GTK+ API (stability and security), and a new interface. It's quite pleasant to watch the progress of my own &lt;a href=&quot;http://neugierig.org/software/chromium/notes/2012/02/the-end.html&quot;&gt;rounding error&lt;/a&gt; as each day it continues transforming into a modern browser.&lt;br /&gt;&lt;br /&gt;There were some interesting design choices to make when implementing accelerated compositing in WebKit2. Ports typically choose one of two possibilities for where to actually composite the content of page layers. The first and simplest path, taken by the GTK+ and Mac ports is to do all GPU composition in the WebProcess, which the same process that renders the layer content. This is by far the simplest and most straight-forward path, as WebKit does not have to send bitmap and layer data across the process boundary. The Qt and EFL ports have chosen to do composition in the UIProcess, which is the process that controls the user interface components surrounding the page content. From what I understand, this more complex design is an attempt to lower the latency of touch events and to decrease the number of OpenGL context switches. It's unclear now what the best approach is for browsers on embedded systems, but composition in the WebProcess works quite well for Epiphany at the moment.&lt;br /&gt;&lt;br /&gt;During this development cycle we'll continue to improve the implementation of accelerated compositing, but we hope to start looking at other rendering and interactivity improvements such as accelerated canvas, a tiled backing store, touch event handling and a threaded scrolling implementation.&amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;I'm most excited about accelerated canvas, because of the work we've been doing recently on Cairo GL. The GL backend of Cairo has been experimental for some time and isn't widely distributed, but recently there's been &lt;/span&gt;&lt;a href=&quot;http://code.google.com/p/cairogles/&quot; style=&quot;background-color: white;&quot;&gt;an attempt&lt;/a&gt;&lt;span style=&quot;background-color: white;&quot;&gt; to increase its performance and to make it more suitable for embedded platforms.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once we integrate Cairo GL with our accelerated compositing architecture in WebKitGTk+, canvas content can be rasterized directly on the GPU instead of the CPU. For most systems accelerated canvas means better performance and lower power usage. Hopefully, I can land the patches to enable this as early as Gnome 3.6, but I'm still not sure when the OpenGL backend in Cairo will be officially supported. This means that, for the moment at least, you'll need to compile Cairo yourself to test accelerated canvas.&lt;/div&gt;
</description>
      </item>
    
    
    
      <item>
        <title>WebKitGTK+ hackfest wrapup: accelerated compositing</title>
        <link>http://abandonedwig.info/blog/2011/12/08/webkitgtk-hackfest-wrapup-accelerated.html</link>
        <pubDate>Thu, 08 Dec 2011 00:00:00 EST</pubDate>
        <name>Martin Robinson (Martin Robinson)</name>
        <guid>http://abandonedwig.info/blog/2011/12/08/webkitgtk-hackfest-wrapup-accelerated.html</guid>
        <description>&lt;div class='post'&gt;
I just returned from this year's&amp;nbsp;&lt;a href=&quot;http://live.gnome.org/Hackfests/WebKitGTK2011&quot;&gt;WebKitGTK+ hackfest&lt;/a&gt;. Not only was it the most productive hackfest to date, the diversity of the people involved was incredible. Attendees included hackers from Igalia, Collabora, RedHat and Motorola. It's great to be part of a company which can pull this kind of event together.&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; position: static; text-align: left; z-index: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/mariosp/6429999491/in/photostrea&quot;&gt;&lt;img alt=&quot;WebKitGTK+ 2011 Hackfest&quot; height=&quot;160&quot; src=&quot;http://farm8.staticflickr.com/7035/6429999491_82a5d7d58e_m.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/mariosp/6429999491/in/photostream&quot;&gt;Planning&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&amp;nbsp;One of the things different about this hackfest were the &lt;a href=&quot;http://en.wikipedia.org/wiki/Birds_of_a_feather_(computing)&quot;&gt;BoFs&lt;/a&gt;, which were mainly planning sessions. The WebKitGTK+ community has shifted from a ragtag group of developers unafraid of &lt;tt&gt;g_object_ref&lt;/tt&gt; and &lt;tt&gt;g_object_unref&lt;/tt&gt; furiously hacking on a tiny WebKit port to an integral piece of the Gnome renaissance moving steadily toward ambitious goals. I'm obviously biased, but I believe the investment of small companies with strong ideals like &lt;a href=&quot;http://igalia.com/&quot;&gt;Igalia&lt;/a&gt; and &lt;a href=&quot;http://collabora.co.uk/&quot;&gt;Collabora&lt;/a&gt; is directly responsible.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Others have already reported on &lt;a href=&quot;http://blogs.igalia.com/juanjo/2011/12/04/webkitgtk-hackfest-wrap-up/&quot;&gt;some of the incredible work&lt;/a&gt; at the hackfest including the &lt;a href=&quot;http://blogs.gnome.org/xan/2011/12/04/a-new-design-for-epiphany-web/&quot;&gt;bold new Epiphany redesign&lt;/a&gt;, &lt;a href=&quot;http://blogs.igalia.com/mario/2011/12/06/webkitgtk-hackfest-wk2-a11y-and-ephiphanys-ad-blocker/&quot;&gt;accessibility support for WebKit2&lt;/a&gt;, and &lt;a href=&quot;http://blog.kov.eti.br/?p=223&quot;&gt;JHBuild-ification&lt;/a&gt;. I'd like to talk a bit about something in which I'm personally involved: &lt;a href=&quot;http://www.chromium.org/developers/design-documents/gpu-accelerated-compositing-in-chrome&quot;&gt;accelerated compositing&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; margin-left: 1em; position: relative; text-align: right; z-index: 0;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;a href=&quot;http://live.gnome.org/Design/Apps/Web&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://blogs.gnome.org/xan/files/2011/12/web-overview.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://live.gnome.org/Design/Apps/Web&quot;&gt;Epiphany's new look&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Accelerated compositing was introduced in 2009 with the bulk of the work provided by Apple and Google. GPUs are quite fast, but because of the overhead of moving bits from main main memory to GPU memory, &lt;a href=&quot;https://plus.google.com/105051985738280261832/posts/2FXDCz8x93s&quot;&gt;you need to use them intelligently to see any speedup&lt;/a&gt;. Accelerated compositing is the smarts needed to use the GPU intelligently in WebKit. We're also trying to push these smarts down into painting libraries such as &lt;a href=&quot;http://cairographics.org/OpenGL/&quot;&gt;Cairo&lt;/a&gt; and &lt;a href=&quot;http://code.google.com/p/skia/wiki/GrContext&quot;&gt;Skia&lt;/a&gt;, but that's a more difficult task, with less immediate benefit. The best performance improvements come from using the GPU at the place that maintains the drawing state.&lt;br /&gt;&lt;br /&gt;In the context of WebKit, drawing state is the rendered page itself, with all its layered divs, canvas elements, video tags and WebGL contexts. WebKit stores elements to render in a data structure called the &quot;&lt;a href=&quot;http://www.webkit.org/blog/114/webcore-rendering-i-the-basics/&quot;&gt;render tree&lt;/a&gt;.&quot; Members of the the render tree which are drawn in main memory must be sent to the GPU to be displayed on the screen. Furthermore, some of these elements may be rendered on the GPU itself, so ideally we want to avoid copying them to main memory only to copy them back to the GPU at a later stage.&lt;br /&gt;&lt;br /&gt;CPUs are very fast, so it's often sufficient to rasterize things into main memory. On the other hand, when the entire page is rendered by the CPU, it spends a lot of time doing &quot;boring&quot; tasks that the GPU loves doing, such as compositing (blending images into each other). Accelerated compositing attacks this by slicing the page into layers of related content. The way this slicing works is a heuristic, but generally speaking divs at the same z-index, with the same CSS transform, WebGL contexts and hardware accelerated video are their own layer. It renders each of the non-GPU layers into an image and then uploads all the images to be composited by the GPU along with layers that are already there.&lt;br /&gt;&lt;br /&gt;Collabora, which created the Clutter port of WebKit has an implementation of accelerated compositing using Clutter. At the hackfest, Joone Hurr and Gustavo Noronha Silva started integrating this version into WebKitGTK+. The nice thing about the Clutter implementation is that it's almost complete. The unfortunate thing is that Clutter uses COGL which has very poor support for using raw OpenGL in the application. Obviously this means that the WebKitGTK+ port would need to rewrite it's WebGL backend. Igalia is also working on two implementations (OpenGL and the Cairo fallback) using No'am Rosenthal's very nice TextureMapper abstraction.&lt;br /&gt;&lt;br /&gt;During the hackfest, we decided to attempt to integrate all three approaches into the tree. The Clutter version is a nice stopgap for people who want to play with accelerated compositing or are using Clutter already. The intial parts of this implementation should be landing soon. Over the next few months we'll also be submitting OpenGL and Cairo versions of accelerated compositing. We already made great progress at the hackfest. If you're interested in following the work, you can follow the &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=74087&quot;&gt;accelerated compositing metabug&lt;/a&gt;.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://foundation.gnome.org/&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.gnome.org/wp-content/themes/gnome-grass/images/gnome-logo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://igalia.com/&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-T1wYSHpQsiQ/TuDcfC9AmXI/AAAAAAAAASY/oii41HDU3tA/s1600/igalia.png.4KFG6V&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://collabora.co.uk/&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;104&quot; src=&quot;http://laszlopandy.com/blog_files/collabora-logo.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
</description>
      </item>
    
    
    
    
    
      <item>
        <title>Faster Shadows</title>
        <link>http://abandonedwig.info/blog/2011/03/13/faster-shadows.html</link>
        <pubDate>Sun, 13 Mar 2011 00:00:00 EST</pubDate>
        <name>Martin Robinson (Martin Robinson)</name>
        <guid>http://abandonedwig.info/blog/2011/03/13/faster-shadows.html</guid>
        <description>&lt;div class='post'&gt;
One area we paid particular attention last year at &lt;a href=&quot;http://igalia.com/&quot;&gt;Igalia&lt;/a&gt; was the performance of shadow rendering in web content. While web shadows are not yet ubiquitous, a slow shadow implementation can cause poor scrolling and redraw performance, ruining your day like an afternoon full of stepping in wet cement. Until recently, the GTK+ (and all Cairo) ports had one of these slow shadow implementations. Scrolling through identi.ca posts could lock Epiphany's user interface for several painful seconds. Alex and I set out to improve this situation.&lt;br /&gt;&lt;br /&gt;I separate shadowed web content into three categories: CSS &lt;a href=&quot;http://www.w3.org/TR/css3-background/#the-box-shadow&quot;&gt;box&lt;/a&gt; and &lt;a href=&quot;http://www.w3.org/TR/2011/WD-css3-text-20110215/#text-shadow&quot;&gt;text shadows&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#shadows&quot;&gt;canvas shadows&lt;/a&gt; and SVG shadows. Even though a different standard addresses each of these categories of shadows, the process of drawing the shadow remains very similar. The web rendering engine simply draws a copy of the shadowed object underneath itself with a solid fill (the shadow fill). This &quot;shadow image&quot; may also be blurred with a certain radius. For each of the standards that I mentioned, it is sufficient to blur the shadow image by estimating a &lt;a href=&quot;http://en.wikipedia.org/wiki/Gaussian_blur&quot;&gt;Gaussian blur&lt;/a&gt; on its pixels.&lt;br /&gt;&lt;br /&gt;A Gaussian blur is just the application of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Normal_distribution&quot;&gt;normal distribution&lt;/a&gt; to the pixel values of an image. The value of a pixel in the blurred image is calculated by combining the values of the pixels around it in the original image. The contribution of a particular surrounding pixel decreases with the distance from the target pixel. Until recently the Cairo port performed an &lt;em&gt;actual&lt;/em&gt; Gaussian blur with an expensive two-dimensional kernel. The&amp;nbsp;first speed improvement involved making &lt;a href=&quot;http://ariya.blogspot.com/&quot;&gt;Ariya Hidayat's&lt;/a&gt; &lt;a href=&quot;http://trac.webkit.org/changeset/67559&quot;&gt;fast blurring algorithm&lt;/a&gt; (for the Qt port) cross-platform and using it for our own shadows. This algorithm estimates a Gaussian blur by performing multiple one-dimension motion blurs. This decreases the number of pixels that need to be read to calculate a target pixel and also increases the number of cache hits during the blurring calculation.&lt;br /&gt;&lt;br /&gt;In the course of our work we realized that we were not clipping the shadowed area when blurring. For instance, &lt;a href=&quot;http://identi.ca/&quot;&gt;identi.ca&lt;/a&gt; has one long column of content that extends down the page with a box blur. Instead of blurring just the part of the column visible in the viewport, we were blurring the entire box. This simple fix alone was enough to make most sites usable.&lt;br /&gt;&lt;br /&gt;Alex performed the &lt;a href=&quot;http://trac.webkit.org/changeset/69092&quot;&gt;final and most novel optimization&lt;/a&gt; for box shadows. Here's an image extremely typical web content with a shadowed div.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;281&quot; src=&quot;http://1.bp.blogspot.com/-gOVZs7QvkKE/TX1JPbbEBfI/AAAAAAAAAOs/u2USjvvJbB4/s400/one.png&quot; width=&quot;283&quot; /&gt;&lt;/div&gt;If we remove everything but the shadow we are left with what you see below. A lot of this information is repeated. In fact, we can divide the image into nine regions of unique information. Obviously we are calculating the same few values over and over again. Keep in mind that the slowest part of creating a blurry shadow is estimating the Gaussian.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;273&quot; src=&quot;http://3.bp.blogspot.com/-RA4OeJrGq2M/TX1JkqtBD5I/AAAAAAAAAO0/9yzV_PIEAIY/s400/two.png&quot; width=&quot;270&quot; /&gt;&lt;br /&gt;&lt;img border=&quot;0&quot; height=&quot;273&quot; src=&quot;http://2.bp.blogspot.com/-z9fSUszyz-w/TX1Jtxe3GII/AAAAAAAAAO8/rTENqnWATZ0/s400/three.png&quot; width=&quot;270&quot; /&gt;&lt;br /&gt;&lt;/div&gt;Each of non-corner regions of the box are made up of the same row of pixels repeated down their length.  In fact, if we had only one a single row of those blurred pixels we could just copy it into the region where the shadow belongs. This is precisely what Alex's implementation does. Instead of rendering the large shadowed area above, we can simply calculate a smaller box and copy the data into the target image.  &lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;110&quot; src=&quot;http://3.bp.blogspot.com/-np4whfyd0XE/TX1J4dbGXHI/AAAAAAAAAPE/ftm-67jio1w/s400/four.png&quot; width=&quot;120&quot; /&gt;&lt;/div&gt;I'm quite pleased with the performance of shadows now. There are a few more optimizations we could do, such as extending the tiling optimization to inset shadows. In fact, the Mac port has made our implementation cross-platform and has already added support for inset shadows. Hopefully more WebKit ports will soon be able to benefit from these optimizations.&lt;/div&gt;
</description>
      </item>
    
    
    
    
    
    
    
      <item>
        <title>Looking back at the WebKit GTK hackfest</title>
        <link>http://abandonedwig.info/blog/2010/01/23/looking-back-at-webkit-gtk-hackfest.html</link>
        <pubDate>Sat, 23 Jan 2010 00:00:00 EST</pubDate>
        <name>Martin Robinson (Martin Robinson)</name>
        <guid>http://abandonedwig.info/blog/2010/01/23/looking-back-at-webkit-gtk-hackfest.html</guid>
        <description>&lt;div class='post'&gt;
In December, I attended the WebKit GTK hackfest which has been &lt;a href=&quot;http://blogs.gnome.org/xan/2009/12/21/webkitgtk-hackfest-day-g_maxint/&quot;&gt;summed&lt;/a&gt; &lt;a href=&quot;http://arstechnica.com/open-source/news/2010/01/webkitgtk-hackfest-improves-html-renderer-for-gnome-apps.ars&quot;&gt;up&lt;/a&gt; &lt;a href=&quot;http://danw.mysterion.org/2010/01/webkitgtk-hackfest/&quot;&gt;nicely&lt;/a&gt; in &lt;a href=&quot;http://blog.kov.eti.br/?p=100&quot;&gt;many&lt;/a&gt; &lt;a href=&quot;http://www.twotoasts.de/index.php?/archives/25-Back-from-the-WebKitGTK+-hackfest.html&quot;&gt;other&lt;/a&gt; &lt;a href=&quot;http://base-art.net/Articles/112/&quot;&gt;places&lt;/a&gt;. Some of the things I worked on (apart from getting my luggage):&lt;br /&gt;&lt;br /&gt;With the closing of &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=20736&quot;&gt;20736&lt;/a&gt; WebKit GTK should now properly support windows with RGBA colormaps. This means that WebKit GTK can now be used to create nice desktop widgets or non-rectangular applications without worrying about BadMatch errors. Surprisingly non-rectangular windows is one of the most requested features for &lt;a href=&quot;http://www.appcelerator.com&quot;&gt;Titanium&lt;/a&gt; and we now support it on OS X, Linux and Windows via the &lt;tt&gt;transparent-background&lt;/tt&gt; property in tiapp.xml.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://abandonedwig.info/blog/uploaded_images/rgba-colormaps-704760.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 331px; height: 400px;&quot; src=&quot;http://abandonedwig.info/blog/uploaded_images/rgba-colormaps-704752.png&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first big part of my &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=30623&quot;&gt;clipboard / drag-and-drop reorganization&lt;/a&gt; also landed. Once I get the remaining patches together, DOM DataTransfer access to WebKit GTK clipboard and drag-and-drop data will work properly. With luck one day you'll be able to drop your photos and videos onto your web browser and have them upload seamlessly.&lt;br /&gt;&lt;br /&gt;The hackfest itself was in A Coru&amp;ntilde;a, a picturesque Galician city right on the coast of the Atlantic (which I managed to call the &lt;i&gt;Pacific&lt;/i&gt; once, against all odds). I also had a rather abrupt introduction to the bounty of European languages &amp;mdash; Spain has four recognized regional languages apart from Spanish (Castilian).&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;font-size:small;text-align:center&quot;&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://www.flickr.com/photos/mariosp/4201554598/in/set-72157622899055111&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 500px; height: 375px;&quot; src=&quot;http://farm3.static.flickr.com/2773/4201554598_3fea667df2.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://blogs.gnome.org/xan/&quot;&gt;Xan&lt;/a&gt; and me, probably trying to convince him that drag-and-drop is the future.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;On a personal note, the hackfest solidified my love for open source software. I want to keep doing this, however possible. &lt;a href=&quot;http://neugierig.org/&quot;&gt;Evan Martin&lt;/a&gt; made a really good point about open source at some point during the hackfest. He said that people sometimes think that being open source means that you can simply host an archive of your source code somewhere. There is more to it though, including having an open and active community and understanding and responding to your users. Some of this is just good software development practice, but being open source requires doing even more work to open the development process.&lt;br /&gt;&lt;br /&gt;One important aspect of this work is having community discussions and allowing the community to help make decisions. One look at the WebKit development mailing list shows this working. There are many interests tied up with WebKit and some of them are direct competitors, yet somehow they manage to coordinate development on a humongous project. LWN.net recently posted a &lt;a href=&quot;http://lwn.net/Articles/370157/&quot;&gt;great article related to this topic&lt;/a&gt;, which I think exemplifies what not to do.&lt;/div&gt;
</description>
      </item>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

  </channel>
</rss>

