Open Bug 609704 Opened 14 years ago Updated 17 days ago

Slower drawImage than Chrome in Peacekeeper movie test

Categories

(Core :: Graphics: Canvas2D, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: developer, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf, Whiteboard: [painting-perf])

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b8pre) Gecko/20101104 Firefox/4.0b8pre

In test 12 of Peacekeeper, it uses drawImage to render over 300 images like a movie.  The first use of drawImage is the basic 3 parameters and it FF4 is faster than Chrome there.  But, it also uses drawImage to create a ripple effect below the image.  This uses 9 parameters and FF4 is slower.  I've also tested it with just 5 parameters and FF4 is still slower.

I've created two test cases, 11e.html and 11f.html.  11e.html uses the 5 parameter drawImage while 11f.html uses the 9 parameter.  My times for both are:

FF4:
11e.html: 535ms
11f.html: 676ms

Chrome7:
11e.html: 210ms
11f.html: 266ms

I've also tested it with "layers.accelerate-none" set to true and "layers.accelerate-all" set to false.  My numbers didn't change that much.

Reproducible: Always

Steps to Reproduce:
1. Run the test11e.html and test11f.html attachments in FF4 and Chrome
2. Notice the speed difference
3.
Actual Results:  
FF4 is slower

Expected Results:  
FF4 is as fast or faster than Chrome
Attached image frame0.jpg
Image for test case
Attached file test11e.html
5 parameter drawImage
Attached file test11f.html
9 parameter drawImage
Blocks: peacekeeper
Is that a version of Chrome with hw accel for canvas?  Not sure if that's enabled by default or not.

Also, just for reference -- the 5-param (img + 4) version's arguments are the destination rectangle.  So drawImage(img, x, y, w, h) takes the entire image and draws it into the (x, y, w, h) rect on the canvas, scaling to fit.  The full 9-param version specifies both a source rectangle and a destination rectangle.

So I think what you're likely seeing here is slow scaling in pixman, especially since you're on XP and thus aren't getting d2d; but even with d2d we could be faster.
Whiteboard: [painting-perf]
I'm using Chrome 7.0.517.41.  Looking around on the internet, I think I have to use a command line flag to enable hw accel for that version.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: perf
This needs some profiling.

On linux we're still quite a bit slower.
On Linux most of the time is spent in Xorg code, in pixman_image_composite
We're a bit faster than Chrome on mac.
Severity: normal → S3
Severity: S3 → --
Component: Graphics → Graphics: Canvas2D
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: