<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23774</bug_id>
          
          <creation_ts>2013-11-08 09:32:27 +0000</creation_ts>
          <short_desc>Propose to add &quot;imagecanvas&quot; attribute for Canvas Element</short_desc>
          <delta_ts>2014-09-29 21:47:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NEEDSINFO</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Needs Impl Interest</target_milestone>
          <dependson>23773</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="steve faulkner">faulkner.steve</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>eric.sun</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>96027</commentid>
    <comment_count>0</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2013-11-08 09:32:27 +0000</bug_when>
    <thetext>+++ This bug was initially created as a clone of Bug #23773 +++

Example: 
  
   &lt;canvas id=&quot;myCanvas&quot; imagecanvas=&quot;true”&gt;&lt;/canvas&gt;
    if imagecanvas is true, canvas only render image, otherwise operate like normal case.

Reason: 

   During development of browser, we find that,if the browser engine can know that this canvas is only for drawring image and identify this scenario, then the browser engine can give GPU accelaration for this only-drawing-image scenario.

   If we draw canvas, when drawimage,and there are other non-image drawing,like text or line, the performance is downgraded.

   After we implement this attribute for canvas element in our android webkit kernal,we got test data for using this attribute, and not using this attribute.Below is the performance comparision.We use 5 games to test our implementation, and find the effect is obvious,please find detailed data below.


Benefit:
   
   1) for developer, this attribute is easy to use,we can draw different type draw in different canvas,we can get high performance web page.
   2) for browser engine, it can fully optimize the performance of drawing an image,make best use of powser of GPU accelerator.


Test Data:
   
1、	FishIE Scenario（http://ie.microsoft.com/testdrive/Performance/FishIETank/Default.html）
number of fish         	1	10	20	50	100
before（fps）           46	26	15	12	8
after（fps）            60	58	58	58	50
effect(%）	    30.43	123.07	286.66	383.33	525.00
2、	GUIMark3（http://www.craftymind.com/factory/guimark3/bitmap/GM3_JS_Bitmap.html）
	
before fps）	32
after （fps）	60
effect（%）	87.50
3、	FishBowl Scenario（http://ie.microsoft.com/testdrive/Performance/FishBowl/）
number of fish          5	10	50
before(fps）	        5	4	2
after( fps）	        60	60	53
effect（%）	    1100.00	1400.00	2500.00
4 CanvasGameTest
	        fps
before	        42
after	        121
effect（%）	188.50

5 fishjoy

	  fps
before	  30fps
after	  50fps
effect（%）66.67</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112312</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-26 21:16:16 +0000</bug_when>
    <thetext>I don&apos;t understand what you mean by a canvas that only gets an image. Wouldn&apos;t &lt;img&gt; be sufficient in that kind of case?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>