<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mike R :: R ekim &#187; browsers</title>
	<atom:link href="http://www.rekim.com/tag/browsers/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.rekim.com</link>
	<description>Mike Robinson</description>
	<lastBuildDate>Sat, 27 Jan 2024 18:04:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>html5 canvas globalCompositeOperation browser handling</title>
		<link>https://www.rekim.com/2011/02/11/html5-canvas-globalcompositeoperation-browser-handling/</link>
		<comments>https://www.rekim.com/2011/02/11/html5-canvas-globalcompositeoperation-browser-handling/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 21:16:14 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[canvas]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[globalCompositeOperation]]></category>

		<guid isPermaLink="false">http://www.rekim.com/?p=75</guid>
		<description><![CDATA[IE9 came out of beta yesterday and so I checked it out to see if the release candidate had sorted out globalCompositeOperation which could only handle source-over in beta. The good news is that it can! So we can start &#8230; <a href="https://www.rekim.com/2011/02/11/html5-canvas-globalcompositeoperation-browser-handling/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>IE9 came out of beta yesterday and so I checked it out to see if the release candidate had sorted out globalCompositeOperation which could only handle source-over in beta.</p>
<p><strong>The good news is that it can!</strong> So we can start using it more without work arounds!</p>
<p>But do all the browsers behave the same? Obviously not. I remember Microsoft saying they had left it off the beta because they didn&#8217;t think the standards were nailed down enough. I ran the <a href="https://developer.mozilla.org/samples/canvas-tutorial/6_1_canvas_composite.html">mozilla canvas composite check</a> on different browsers to see how they all handle it. Here are the results.</p>
<div id="attachment_76" class="wp-caption alignleft" style="width: 279px"><a href="http://www.rekim.com/wp-content/uploads/2011/02/Ie9rc.gif"><img class="size-full wp-image-76 " title="IE9 Release Candidate 1" src="http://www.rekim.com/wp-content/uploads/2011/02/Ie9rc.gif" alt="IE9 Release Candidate 1" width="269" height="248" /></a><p class="wp-caption-text">IE9 Release Candidate 1</p></div>
<div id="attachment_77" class="wp-caption alignleft" style="width: 279px"><a href="http://www.rekim.com/wp-content/uploads/2011/02/Opera10.62.gif"><img class="size-full wp-image-77 " title="Opera 10.62" src="http://www.rekim.com/wp-content/uploads/2011/02/Opera10.62.gif" alt="Opera 10.62" width="269" height="248" /></a><p class="wp-caption-text">Opera 10.62</p></div>
<div id="attachment_78" class="wp-caption alignleft" style="width: 279px"><a href="http://www.rekim.com/wp-content/uploads/2011/02/Firefox3.613.gif"><img class="size-full wp-image-78 " title="Firefox 3.613" src="http://www.rekim.com/wp-content/uploads/2011/02/Firefox3.613.gif" alt="Firefox 3.613" width="269" height="248" /></a><p class="wp-caption-text">Firefox 3.613</p></div>
<div id="attachment_79" class="wp-caption alignleft" style="width: 279px"><a href="http://www.rekim.com/wp-content/uploads/2011/02/Chrome9.0.597.94.gif"><img class="size-full wp-image-79" title="Chrome 9.0.597.94" src="http://www.rekim.com/wp-content/uploads/2011/02/Chrome9.0.597.94.gif" alt="Chrome 9.0.597.94" width="269" height="248" /></a><p class="wp-caption-text">Chrome 9.0.597.94</p></div>
<div id="attachment_80" class="wp-caption alignleft" style="width: 279px"><a href="http://www.rekim.com/wp-content/uploads/2011/02/Safari5.03.gif"><img class="size-full wp-image-80" title="Safari 5.03" src="http://www.rekim.com/wp-content/uploads/2011/02/Safari5.03.gif" alt="Safari 5.03" width="269" height="248" /></a><p class="wp-caption-text">Safari 5.03</p></div>
<p style="clear: both; margin-top: 20px;">You can see that IE9, Opera and firefox(ignoring the copy) behave the same and the 2 webkit browsers Chrome and Safari behave the same.</p>
<p>Chrome and Safari seem to be the only ones to handle the &#8220;darker&#8221; mode and they handle &#8220;source-in&#8221;, &#8220;source-out&#8221;, &#8220;destination-in&#8221;, &#8221;destination-atop&#8221; differently. The webkit browsers seem to handle the &#8220;Display transparency elsewhere&#8221; rule differently by leaving the destination visible in the transparent areas of the source.</p>
<p>Judging by the rules found on <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#compositing">whatwg.org</a> I have gone through and created a tick list of what is behaving correctly according to them.</p>
<p>The only ones we can trust to be the same across the main 5 are&#8230;. &#8220;source-over&#8221;,&#8221;source-atop&#8221;,&#8221;destination-over&#8221;,&#8221;destination-out&#8221;,&#8221;lighter&#8221; and &#8220;xor&#8221;</p>
<table style="font-weight: bold; width: 600px;">
<tbody>
<tr>
<td>Composition</td>
<td>IE9</td>
<td>Opera</td>
<td>Firefox</td>
<td>Chrome</td>
<td>Safari</td>
</tr>
<tr>
<td>&#8220;source-over&#8221;</td>
<td><img class="alignleft size-full wp-image-83" title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
</tr>
<tr>
<td>&#8220;source-in&#8221;</td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
</tr>
<tr>
<td>&#8220;source-out&#8221;</td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
</tr>
<tr>
<td>&#8220;source-atop&#8221;</td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
</tr>
<tr>
<td>&#8220;destination-over&#8221;</td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
</tr>
<tr>
<td>&#8220;destination-in&#8221;</td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
</tr>
<tr>
<td>&#8220;destination-out&#8221;</td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
</tr>
<tr>
<td>&#8220;destination-atop&#8221;</td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
</tr>
<tr>
<td>&#8220;lighter&#8221;</td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
</tr>
<tr>
<td>&#8220;darker&#8221;</td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
</tr>
<tr>
<td>&#8220;copy&#8221;</td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><a href="http://www.rekim.com/wp-content/uploads/2011/02/cross.png"><img class="alignleft size-full wp-image-84" title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></a></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
<td><img title="cross" src="http://www.rekim.com/wp-content/uploads/2011/02/cross-e1297450819738.png" alt="" width="18" height="18" /></td>
</tr>
<tr>
<td>&#8220;xor&#8221;</td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
<td><img title="tick" src="http://www.rekim.com/wp-content/uploads/2011/02/tick2.png" alt="" width="15" height="13" /></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>https://www.rekim.com/2011/02/11/html5-canvas-globalcompositeoperation-browser-handling/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
