Closed Bug 707143 Opened 13 years ago Closed 8 years ago

DrawImage very slow on HTML5 canvas

Categories

(Core :: Graphics: Canvas2D, defect)

11 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 705559

People

(Reporter: lambin, Unassigned)

References

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
Build ID: 20111104165243

Steps to reproduce:

(Firefox 8 or Nightly 11.0a1)
Go to
http://codef.santo.fr/tutorials/32_scrolltext/index.html
http://codef.santo.fr/tutorials/35_scrolltext/index.html



Actual results:

The animation is very slow (less than 10fps)


Expected results:

On Google Chrome, the animation runs at full speed (around 75fps).
Does not work on Opera 11 or Internet Explorer.
Component: General → Canvas: 2D
Product: Firefox → Core
QA Contact: general → canvas.2d
There are 2 regression window (regressed by Bug 651858 and Bug 655836) at least.

#1 Regression window(m-c)
Fast
http://hg.mozilla.org/mozilla-central/rev/450e4d9ea2d5
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110624 Firefox/7.0a1 ID:20110625025936
Worsened(Very slow)
http://hg.mozilla.org/mozilla-central/rev/48ad4ffc4230
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110625 Firefox/7.0a1 ID:20110625030821
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=450e4d9ea2d5&tochange=48ad4ffc4230
Suspected by:
Bug 651858 - [Azure] Implement Direct2D Azure Backend

# Improved window(m-c)
Very slow:
http://hg.mozilla.org/mozilla-central/rev/7aa58a99a2e5
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110630 Firefox/7.0a1 ID:20110630003937
Slightly improved(Slow):
http://hg.mozilla.org/mozilla-central/rev/5c246f2bccb1
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110630 Firefox/7.0a1 ID:20110630035829
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7aa58a99a2e5&tochange=5c246f2bccb1
# Improved window(m-i)
Very slow:
http://hg.mozilla.org/integration/mozilla-inbound/rev/a053ab0d8633
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110629 Firefox/7.0a1 ID:20110629164302
Slightly improved(Slow):
http://hg.mozilla.org/integration/mozilla-inbound/rev/5b365b5e9213
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110629 Firefox/7.0a1 ID:20110629183832
Slightly improvedPushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=a053ab0d8633&tochange=5b365b5e9213

#2 Regression window(m-c)
Slow
http://hg.mozilla.org/mozilla-central/rev/70e4de45a0d0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111005 Firefox/10.0a1 ID:20111005030932
Worsened again(Very slow)
http://hg.mozilla.org/mozilla-central/rev/38a487da2def
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111005 Firefox/10.0a1 ID:20111005040258
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=70e4de45a0d0&tochange=38a487da2def
#2 Regression window(m-i)
Slow:
http://hg.mozilla.org/integration/mozilla-inbound/rev/6029755897c3
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111004 Firefox/10.0a1 ID:20111004153633
Worsened again(Very slow):
http://hg.mozilla.org/integration/mozilla-inbound/rev/64f1fe963b51
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111004 Firefox/10.0a1 ID:20111004174400
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=6029755897c3&tochange=64f1fe963b51
Suspected bug:
a00620f3c3de	Bas Schouten — Bug 655836: Use Snapshot API for drawing one Azure canvas to another. r=roc
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Workaround: set gfx.canvas.azure.enabled to false
Is the testcase passing a <canvas> to drawImage?  If so, this is likely a duplicate of bug 705559.
Depends on: 705559
I'm not a Javascript developper but the testcases mostly do a lot of calls to a function called drawPart(), which is defined here :

http://codef.santo.fr/codef/codef_core.js

...in which the calls to DrawImage() look like this :

dst.contex.drawImage(this.canvas,partx,party,partw,parth,null,null,partw,parth);
Yeah, that's passing a canvas to drawImage for sure.  Should retest once bug 705559 is fixed.
@lambin: please try again with Firefox 11+
I think this can be set to resolved/fixed
The link you provided is no longer available, can you please provide another one so I can test this on my end?
Also, is this still reproducible on your end ? If yes, can you please retest this using latest FF release and latest Nightly build (https://nightly.mozilla.org/) and report back the results ? When doing this, please use a new clean Firefox profile, maybe even safe mode, to eliminate custom settings as a possible cause (https://goo.gl/PNe90E).

Thanks.
Flags: needinfo?(lambin)
You can access it now there http://codef.santo.fr/tutorials/32_scrolltext.html

It looks fixed on Firefox 46.0.1
Flags: needinfo?(lambin)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Resolution: INVALID → DUPLICATE
You need to log in before you can comment on or make changes to this bug.