<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.whatwg.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Roc</id>
	<title>WHATWG Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.whatwg.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Roc"/>
	<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/wiki/Special:Contributions/Roc"/>
	<updated>2026-06-03T10:08:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=CanvasRenderedPixelSize&amp;diff=9618</id>
		<title>CanvasRenderedPixelSize</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=CanvasRenderedPixelSize&amp;diff=9618"/>
		<updated>2014-06-24T01:03:54Z</updated>

		<summary type="html">&lt;p&gt;Roc: Created page with &amp;quot;:&amp;#039;&amp;#039;This proposal is to allow Web developers to match canvas backing store resolution to device resolution.&amp;#039;&amp;#039;  == Use Case Descriptions ==  Use case #1: a Web application needs...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:&#039;&#039;This proposal is to allow Web developers to match canvas backing store resolution to device resolution.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Use Case Descriptions ==&lt;br /&gt;
&lt;br /&gt;
Use case #1: a Web application needs to render content to a canvas (using 2D or WebGL contexts) being displayed on a high-DPI screen. For best quality output, the pixels of the canvas backing store need to match 1:1 with screen pixels.&lt;br /&gt;
&lt;br /&gt;
Use case #2: As #1, and the user moves the page from screen to screen resulting in dynamic DPI changes.&lt;br /&gt;
&lt;br /&gt;
Use case #3: As #1, and the canvas is inside a CSS scale transform which may change dynamically.&lt;br /&gt;
&lt;br /&gt;
Use case #4: As #1, and the canvas&#039;s CSS content box has arbitrary fractional CSS pixel size and offset from the viewport.&lt;br /&gt;
&lt;br /&gt;
Use case #5: As #3, but the canvas is inside an &amp;lt;code&amp;gt;&amp;amp;lt;iframe&amp;amp;gt;&amp;lt;/code&amp;gt; in a page with a different origin which contains the CSS transform.&lt;br /&gt;
&lt;br /&gt;
=== Current Usage and Workarounds ===&lt;br /&gt;
&lt;br /&gt;
Safari shipped a canvas implementation that automatically resized the backing store but this caused various problems, such as incompatibility with some existing content and a need for new &amp;quot;HD&amp;quot; APIs that authors were not motivated to use. This approach does not work for WebGL in any case.&lt;br /&gt;
&lt;br /&gt;
The current best workaround is to set the canvas backing store size by computing the canvas content box in CSS pixels relative to the viewport, as accurately as possible (e.g. using &amp;lt;code&amp;gt;getBoxQuads&amp;lt;/code&amp;gt;), multiplying by &amp;lt;code&amp;gt;window.devicePixelRatio&amp;lt;/code&amp;gt;, and using that to set the canvas width and height. This approach does not easily adapt to dynamic changes and does not handle use cases #4 or #5. In use-case #4 the computed device pixel size may be non-integer, in which case the UA is likely to snap the content-box to device pixel edges and the Web developer cannot predict how that snapping will be done. In use-case #5 the developer cannot know about the CSS transform in the foreign-origin content.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
# Leave the application in control of setting the pixel size of the backing store.&lt;br /&gt;
# Retain the invariant that 1 unit in canvas coordinate space is 1 backing store pixel.&lt;br /&gt;
# Make it easy for applications to set the pixel size of the backing store so that backing store pixels are 1:1 with device pixels, when that&#039;s possible.&lt;br /&gt;
&lt;br /&gt;
== Non Goals ==&lt;br /&gt;
&lt;br /&gt;
# Enable high-resolution backing store for existing content.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solutions ==&lt;br /&gt;
&lt;br /&gt;
Hixie proposed a canvas attribute to opt into automatic sizing of the backing store, but this violates goals #1 and #2. Violating goal #1 is a problem because applications often use temporary canvases and other assets which are dependent on the pixel size of the backing store. Goal #1 is also essential for WebGL.&lt;br /&gt;
&lt;br /&gt;
=== Suggested Solution ===&lt;br /&gt;
&lt;br /&gt;
Expose a preferred size for the canvas backing store directly to Web authors. Web authors who want to match screen resolution set the canvas width and height to that size. Expose an event on the canvas that fires when the preferred size changes.&lt;br /&gt;
&lt;br /&gt;
== Suggested IDL ==&lt;br /&gt;
&lt;br /&gt;
Add two new DOM attributes to &amp;lt;code&amp;gt;HTMLCanvasElement&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;partial interface HTMLCanvasElement {&lt;br /&gt;
  readonly attribute long renderedPixelWidth;&lt;br /&gt;
  readonly attribute long renderedPixelHeight;&lt;br /&gt;
};&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The values of these attributes are not normatively defined. For example, a UA might reduce these values to conserve system resources.&lt;br /&gt;
However, under normal steady-state conditions a UA is expected to choose values such that, if the canvas element has a CSS background color exactly filling its content-box, and the UA renders that CSS background color as a rectangle whose edges are aligned to device pixel edges, then &amp;lt;code&amp;gt;renderedPixelWidth&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;renderedPixelHeight&amp;lt;/code&amp;gt; are the device pixel size of that rectangle.&lt;br /&gt;
&lt;br /&gt;
Add a new event &amp;lt;code&amp;gt;renderedsizechange&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;HTMLCanvasElement&amp;lt;/code&amp;gt;. This event does not bubble and is not cancelable. Whenever the value that would be returned by &amp;lt;code&amp;gt;renderedPixelWidth&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;renderedPixelHeight&amp;lt;/code&amp;gt; changes, queue a task to fire &amp;lt;code&amp;gt;renderedsizechange&amp;lt;/code&amp;gt; at the &amp;lt;code&amp;gt;HTMLCanvasElement&amp;lt;/code&amp;gt; if there is not already a task pending to fire such an event at that element.&lt;br /&gt;
&lt;br /&gt;
== Rationale: ==&lt;br /&gt;
&lt;br /&gt;
This API appears to be the minimal API needed to achieve the goals, is opt-in, and can be used in several different ways depending on how ambitious the app developer is:&lt;br /&gt;
* Simplest possible usage: set the canvas size once when loading and don&#039;t handle dynamic changes.&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;script&amp;amp;gt;&lt;br /&gt;
  canvas.width = canvas.renderedPixelWidth; canvas.height = canvas.renderedPixelHeight;&lt;br /&gt;
  &amp;amp;lt;/script&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Update canvas size for every frame of a game:&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;script&amp;amp;gt;&lt;br /&gt;
  function renderFrame() {&lt;br /&gt;
    canvas.width = canvas.renderedPixelWidth; canvas.height = canvas.renderedPixelHeight;&lt;br /&gt;
    ...&lt;br /&gt;
    window.requestAnimationFrame(renderFrame);&lt;br /&gt;
  }&lt;br /&gt;
  &amp;amp;lt;/script&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Update canvas size and re-render only when DPI changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;  &amp;amp;lt;script&amp;amp;gt;&lt;br /&gt;
  function render() {&lt;br /&gt;
    canvas.width = canvas.renderedPixelWidth; canvas.height = canvas.renderedPixelHeight;&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
  canvas.addEventHandler(&amp;quot;renderedsizechange&amp;quot;, render, false);&lt;br /&gt;
  &amp;amp;lt;/script&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Issues: ==&lt;br /&gt;
&lt;br /&gt;
None known.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Roc</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9348</id>
		<title>WorkerCanvas</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9348"/>
		<updated>2013-10-24T09:24:52Z</updated>

		<summary type="html">&lt;p&gt;Roc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WebIDL ==&lt;br /&gt;
&lt;br /&gt;
 [Constructor(unsigned long width, unsigned long height)]&lt;br /&gt;
 interface WorkerCanvas {&lt;br /&gt;
   attribute unsigned long width;&lt;br /&gt;
   attribute unsigned long height;&lt;br /&gt;
   RenderingContext? getContext(DOMString contextId, any... arguments); &lt;br /&gt;
   void toBlob(FileCallback? _callback, optional DOMString type, any... arguments);&lt;br /&gt;
   ImageBitmap transferToImageBitmap();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 WorkerCanvas implements Transferable;&lt;br /&gt;
 ImageBitmap implements Transferable;&lt;br /&gt;
 &lt;br /&gt;
 partial interface HTMLCanvasElement {&lt;br /&gt;
   WorkerCanvas transferControlToWorker();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface ImageBitmap {&lt;br /&gt;
   void transferToImage(HTMLImageElement image);&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
== Spec changes ==&lt;br /&gt;
&lt;br /&gt;
Transferring of ImageBitmaps has to be defined. It should neuter the ImageBitmap in the sending thread. Neutering sets the ImageBitmap&#039;s width and height to 0.&lt;br /&gt;
&lt;br /&gt;
HTMLCanvasElement.transferControlToWorker behaves like transferControlToProxy in the current WHATWG spec. WorkerCanvas is Transferable, but transfer fails if transferred other than from the main thread to a worker. All its methods throw if not called on a worker, or if it&#039;s neutered.&lt;br /&gt;
&lt;br /&gt;
ImageBitmap.transferToImage removes the image element&#039;s &amp;quot;src&amp;quot; attribute and makes the image display the contents of the ImageBitmap (until the next transferToImage to that image, or until the image&#039;s &amp;quot;src&amp;quot; attribute is set). The ImageBitmap is neutered.&lt;br /&gt;
&lt;br /&gt;
[[Category:Proposals]]&lt;/div&gt;</summary>
		<author><name>Roc</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9346</id>
		<title>WorkerCanvas</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9346"/>
		<updated>2013-10-22T21:59:28Z</updated>

		<summary type="html">&lt;p&gt;Roc: /* Spec changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WebIDL ==&lt;br /&gt;
&lt;br /&gt;
 [Constructor(unsigned long width, unsigned long height)]&lt;br /&gt;
 interface WorkerCanvas {&lt;br /&gt;
   attribute unsigned long width;&lt;br /&gt;
   attribute unsigned long height;&lt;br /&gt;
   RenderingContext? getContext(DOMString contextId, any... arguments); &lt;br /&gt;
   void toBlob(FileCallback? _callback, optional DOMString type, any... arguments);&lt;br /&gt;
   ImageBitmap transferToImageBitmap();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface RenderingContext {&lt;br /&gt;
   void commit();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 WorkerCanvas implements Transferable;&lt;br /&gt;
 ImageBitmap implements Transferable;&lt;br /&gt;
 &lt;br /&gt;
 partial interface HTMLCanvasElement {&lt;br /&gt;
   WorkerCanvas transferControlToWorker();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface ImageBitmap {&lt;br /&gt;
   void transferToImage(HTMLImageElement image);&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
== Spec changes ==&lt;br /&gt;
&lt;br /&gt;
Transferring of ImageBitmaps has to be defined. It should neuter the ImageBitmap in the sending thread. Neutering sets the ImageBitmap&#039;s width and height to 0.&lt;br /&gt;
&lt;br /&gt;
HTMLCanvasElement.transferControlToWorker behaves like transferControlToProxy in the current WHATWG spec. WorkerCanvas is Transferable, but transfer fails if transferred other than from the main thread to a worker. All its methods throw if not called on a worker, or if it&#039;s neutered.&lt;br /&gt;
&lt;br /&gt;
ImageBitmap.transferToImage removes the image element&#039;s &amp;quot;src&amp;quot; attribute and makes the image display the contents of the ImageBitmap (until the next transferToImage to that image, or until the image&#039;s &amp;quot;src&amp;quot; attribute is set). The ImageBitmap is neutered.&lt;/div&gt;</summary>
		<author><name>Roc</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9345</id>
		<title>WorkerCanvas</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9345"/>
		<updated>2013-10-22T21:56:56Z</updated>

		<summary type="html">&lt;p&gt;Roc: /* Spec changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WebIDL ==&lt;br /&gt;
&lt;br /&gt;
 [Constructor(unsigned long width, unsigned long height)]&lt;br /&gt;
 interface WorkerCanvas {&lt;br /&gt;
   attribute unsigned long width;&lt;br /&gt;
   attribute unsigned long height;&lt;br /&gt;
   RenderingContext? getContext(DOMString contextId, any... arguments); &lt;br /&gt;
   void toBlob(FileCallback? _callback, optional DOMString type, any... arguments);&lt;br /&gt;
   ImageBitmap transferToImageBitmap();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface RenderingContext {&lt;br /&gt;
   void commit();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 WorkerCanvas implements Transferable;&lt;br /&gt;
 ImageBitmap implements Transferable;&lt;br /&gt;
 &lt;br /&gt;
 partial interface HTMLCanvasElement {&lt;br /&gt;
   WorkerCanvas transferControlToWorker();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface ImageBitmap {&lt;br /&gt;
   void transferToImage(HTMLImageElement image);&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
== Spec changes ==&lt;br /&gt;
&lt;br /&gt;
Transferring of ImageBitmaps has to be defined. It should neuter the ImageBitmap in the sending thread. ImageBitmap.close also neuters the ImageBitmap. Neutering should set the ImageBitmap&#039;s width and height to 0.&lt;br /&gt;
&lt;br /&gt;
HTMLCanvasElement.transferControlToWorker behaves like transferControlToProxy in the current WHATWG spec. WorkerCanvas is Transferable, but transfer fails if transferred other than from the main thread to a worker. All its methods throw if not called on a worker, or if it&#039;s neutered.&lt;br /&gt;
&lt;br /&gt;
ImageBitmap.transferToImage removes the image element&#039;s &amp;quot;src&amp;quot; attribute and makes the image display the contents of the ImageBitmap (until the next transferToImage to that image, or until the image&#039;s &amp;quot;src&amp;quot; attribute is set).&lt;/div&gt;</summary>
		<author><name>Roc</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9344</id>
		<title>WorkerCanvas</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9344"/>
		<updated>2013-10-22T21:55:19Z</updated>

		<summary type="html">&lt;p&gt;Roc: /* WebIDL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WebIDL ==&lt;br /&gt;
&lt;br /&gt;
 [Constructor(unsigned long width, unsigned long height)]&lt;br /&gt;
 interface WorkerCanvas {&lt;br /&gt;
   attribute unsigned long width;&lt;br /&gt;
   attribute unsigned long height;&lt;br /&gt;
   RenderingContext? getContext(DOMString contextId, any... arguments); &lt;br /&gt;
   void toBlob(FileCallback? _callback, optional DOMString type, any... arguments);&lt;br /&gt;
   ImageBitmap transferToImageBitmap();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface RenderingContext {&lt;br /&gt;
   void commit();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 WorkerCanvas implements Transferable;&lt;br /&gt;
 ImageBitmap implements Transferable;&lt;br /&gt;
 &lt;br /&gt;
 partial interface HTMLCanvasElement {&lt;br /&gt;
   WorkerCanvas transferControlToWorker();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface ImageBitmap {&lt;br /&gt;
   void transferToImage(HTMLImageElement image);&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
== Spec changes ==&lt;br /&gt;
&lt;br /&gt;
Transferring of ImageBitmaps has to be defined. It should neuter the ImageBitmap in the sending thread. ImageBitmap.close also neuters the ImageBitmap. Neutering should set the ImageBitmap&#039;s width and height to 0.&lt;br /&gt;
&lt;br /&gt;
HTMLCanvasElement.transferControlToWorker behaves like transferControlToProxy in the current WHATWG spec. WorkerCanvas is Transferable, but transfer fails if transferred other than from the main thread to a worker. All its methods throw if not called on a worker, or if it&#039;s neutered.&lt;br /&gt;
&lt;br /&gt;
ImageBitmap.transferToCanvas replaces the canvas contents with the contents of the ImageBitmap, setting the canvas size to the ImageBitmap&#039;s size.&lt;/div&gt;</summary>
		<author><name>Roc</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9343</id>
		<title>WorkerCanvas</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9343"/>
		<updated>2013-10-22T21:51:53Z</updated>

		<summary type="html">&lt;p&gt;Roc: /* WebIDL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WebIDL ==&lt;br /&gt;
&lt;br /&gt;
 [Constructor(unsigned long width, unsigned long height)]&lt;br /&gt;
 interface WorkerCanvas {&lt;br /&gt;
   attribute unsigned long width;&lt;br /&gt;
   attribute unsigned long height;&lt;br /&gt;
   RenderingContext? getContext(DOMString contextId, any... arguments); &lt;br /&gt;
   void toBlob(FileCallback? _callback, optional DOMString type, any... arguments);&lt;br /&gt;
   ImageBitmap transferToImageBitmap();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface RenderingContext {&lt;br /&gt;
   void commit();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 WorkerCanvas implements Transferable;&lt;br /&gt;
 ImageBitmap implements Transferable;&lt;br /&gt;
 &lt;br /&gt;
 partial interface HTMLCanvasElement {&lt;br /&gt;
   WorkerCanvas transferControlToWorker();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface ImageBitmap {&lt;br /&gt;
   void transferToCanvas((HTMLCanvasElement or WorkerCanvas) canvas);&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
== Spec changes ==&lt;br /&gt;
&lt;br /&gt;
Transferring of ImageBitmaps has to be defined. It should neuter the ImageBitmap in the sending thread. ImageBitmap.close also neuters the ImageBitmap. Neutering should set the ImageBitmap&#039;s width and height to 0.&lt;br /&gt;
&lt;br /&gt;
HTMLCanvasElement.transferControlToWorker behaves like transferControlToProxy in the current WHATWG spec. WorkerCanvas is Transferable, but transfer fails if transferred other than from the main thread to a worker. All its methods throw if not called on a worker, or if it&#039;s neutered.&lt;br /&gt;
&lt;br /&gt;
ImageBitmap.transferToCanvas replaces the canvas contents with the contents of the ImageBitmap, setting the canvas size to the ImageBitmap&#039;s size.&lt;/div&gt;</summary>
		<author><name>Roc</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9342</id>
		<title>WorkerCanvas</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9342"/>
		<updated>2013-10-22T21:48:44Z</updated>

		<summary type="html">&lt;p&gt;Roc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WebIDL ==&lt;br /&gt;
&lt;br /&gt;
 [Constructor(unsigned long width, unsigned long height)]&lt;br /&gt;
 interface WorkerCanvas {&lt;br /&gt;
   attribute unsigned long width;&lt;br /&gt;
   attribute unsigned long height;&lt;br /&gt;
   RenderingContext? getContext(DOMString contextId, any... arguments); &lt;br /&gt;
   void toBlob(FileCallback? _callback, optional DOMString type, any... arguments);&lt;br /&gt;
   ImageBitmap transferToImageBitmap();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface RenderingContext {&lt;br /&gt;
   void commit();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 WorkerCanvas implements Transferable;&lt;br /&gt;
 ImageBitmap implements Transferable;&lt;br /&gt;
 &lt;br /&gt;
 partial interface HTMLCanvasElement {&lt;br /&gt;
   WorkerCanvas transferControlToWorker();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface ImageBitmap {&lt;br /&gt;
   void transferToCanvas((HTMLCanvasElement or WorkerCanvas) canvas);&lt;br /&gt;
   void close();&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
== Spec changes ==&lt;br /&gt;
&lt;br /&gt;
Transferring of ImageBitmaps has to be defined. It should neuter the ImageBitmap in the sending thread. ImageBitmap.close also neuters the ImageBitmap. Neutering should set the ImageBitmap&#039;s width and height to 0.&lt;br /&gt;
&lt;br /&gt;
HTMLCanvasElement.transferControlToWorker behaves like transferControlToProxy in the current WHATWG spec. WorkerCanvas is Transferable, but transfer fails if transferred other than from the main thread to a worker. All its methods throw if not called on a worker, or if it&#039;s neutered.&lt;br /&gt;
&lt;br /&gt;
ImageBitmap.transferToCanvas replaces the canvas contents with the contents of the ImageBitmap, setting the canvas size to the ImageBitmap&#039;s size.&lt;/div&gt;</summary>
		<author><name>Roc</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9341</id>
		<title>WorkerCanvas</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9341"/>
		<updated>2013-10-22T21:48:23Z</updated>

		<summary type="html">&lt;p&gt;Roc: /* WebIDL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WebIDL ==&lt;br /&gt;
&lt;br /&gt;
 [Constructor(unsigned long width, unsigned long height)]&lt;br /&gt;
 interface WorkerCanvas {&lt;br /&gt;
   attribute unsigned long width;&lt;br /&gt;
   attribute unsigned long height;&lt;br /&gt;
   RenderingContext? getContext(DOMString contextId, any... arguments); &lt;br /&gt;
   void toBlob(FileCallback? _callback, optional DOMString type, any... arguments);&lt;br /&gt;
   ImageBitmap transferToImageBitmap();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface RenderingContext {&lt;br /&gt;
   void commit();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 WorkerCanvas implements Transferable;&lt;br /&gt;
 ImageBitmap implements Transferable;&lt;br /&gt;
 &lt;br /&gt;
 partial interface HTMLCanvasElement {&lt;br /&gt;
   WorkerCanvas transferControlToWorker();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface ImageBitmap {&lt;br /&gt;
   void transferToCanvas((HTMLCanvasElement or WorkerCanvas) canvas);&lt;br /&gt;
   void close();&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
== Spec changes ==&lt;br /&gt;
&lt;br /&gt;
Transferring of ImageBitmaps has to be defined. It should neuter the ImageBitmap in the sending thread. ImageBitmap.close also neuters the ImageBitmap. Neutering should set the ImageBitmap&#039;s width and height to 0.&lt;br /&gt;
&lt;br /&gt;
HTMLCanvasElement.transferControlToWorker behaves like transferControlToProxy in the current WHATWG spec. WorkerCanvas is Transferable, but transfer fails if transferred other than from the main thread to a worker. All its methods throw if not called on a worker, or if it&#039;s neutered.&lt;br /&gt;
&lt;br /&gt;
ImageBitmap.transferToCanvas replaces the canvas contents with the contents of the ImageBitmap, setting the canvas size to the ImageBitmap&#039;s size.&lt;br /&gt;
&lt;br /&gt;
== Spec changes ==&lt;br /&gt;
&lt;br /&gt;
Structured clone of ImageBitmaps has to be defined; since they&#039;re immutable, it&#039;s straightforward. The implementation can share the underlying buffer data across threads. An ImageBitmap can also be implemented as the result of deferred rendering of a list of drawing commands.&lt;br /&gt;
&lt;br /&gt;
transferControlToWorker behaves like transferControlToProxy in the current WHATWG spec. WorkerCanvas is Transferable, but transfer fails if transferred other than from the main thread to a worker. All its methods throw if not called on a worker, or if it&#039;s neutered.&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.srcObject behaves like HTMLMediaElement.srcObject: if non-null, it takes precedence over the &amp;quot;src&amp;quot; attribute and renders the contents of the Blob (as a decoded image) or the ImageBitmap.&lt;/div&gt;</summary>
		<author><name>Roc</name></author>
	</entry>
	<entry>
		<id>https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9340</id>
		<title>WorkerCanvas</title>
		<link rel="alternate" type="text/html" href="https://wiki.whatwg.org/index.php?title=WorkerCanvas&amp;diff=9340"/>
		<updated>2013-10-22T21:41:13Z</updated>

		<summary type="html">&lt;p&gt;Roc: Created page with &amp;quot;== WebIDL ==   [Constructor(unsigned long width, unsigned long height)]  interface WorkerCanvas {    attribute unsigned long width;    attribute unsigned long height;    Rende...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== WebIDL ==&lt;br /&gt;
&lt;br /&gt;
 [Constructor(unsigned long width, unsigned long height)]&lt;br /&gt;
 interface WorkerCanvas {&lt;br /&gt;
   attribute unsigned long width;&lt;br /&gt;
   attribute unsigned long height;&lt;br /&gt;
   RenderingContext? getContext(DOMString contextId, any... arguments); &lt;br /&gt;
   void toBlob(FileCallback? _callback, optional DOMString type, any... arguments);&lt;br /&gt;
   ImageBitmap transferToImageBitmap();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface RenderingContext {&lt;br /&gt;
   void commit();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 WorkerCanvas implements Transferable;&lt;br /&gt;
 &lt;br /&gt;
 partial interface HTMLCanvasElement {&lt;br /&gt;
   WorkerCanvas transferControlToWorker();&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface HTMLImageElement {&lt;br /&gt;
   attribute (Blob or ImageBitmap)? srcObject;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 partial interface ImageBitmap {&lt;br /&gt;
   void close();&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
== Spec changes ==&lt;br /&gt;
&lt;br /&gt;
Structured clone of ImageBitmaps has to be defined; since they&#039;re immutable, it&#039;s straightforward. The implementation can share the underlying buffer data across threads. An ImageBitmap can also be implemented as the result of deferred rendering of a list of drawing commands.&lt;br /&gt;
&lt;br /&gt;
transferControlToWorker behaves like transferControlToProxy in the current WHATWG spec. WorkerCanvas is Transferable, but transfer fails if transferred other than from the main thread to a worker. All its methods throw if not called on a worker, or if it&#039;s neutered.&lt;br /&gt;
&lt;br /&gt;
HTMLImageElement.srcObject behaves like HTMLMediaElement.srcObject: if non-null, it takes precedence over the &amp;quot;src&amp;quot; attribute and renders the contents of the Blob (as a decoded image) or the ImageBitmap.&lt;/div&gt;</summary>
		<author><name>Roc</name></author>
	</entry>
</feed>