Closed Bug 739431 Opened 13 years ago Closed 11 years ago

Canvas drawImage is extremely slow on Mac in some situations visible in the Me and My Shadow game

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: ehsan.akhgari, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Attached file Instruments profile (deleted) —
STR: 1. Open http://www.syntensity.com/static/mams/mams.html and start playing the game. When you finish a level, the game renders your moves during that level as the two gray rectangular boxes are drawn to the screen. We perform extremely badly when this happens. According to a profile, we seem to be spending all of our time in DrawTargetCG::DrawSurface calling CGContextDrawImage here: <http://mxr.mozilla.org/mozilla-central/source/gfx/2d/DrawTargetCG.cpp#264>.
(In reply to Ehsan Akhgari [:ehsan] from comment #0) > Created attachment 609507 [details] > Instruments profile > > STR: > > 1. Open http://www.syntensity.com/static/mams/mams.html and start playing > the game. When you finish a level, the game renders your moves during that > level as the two gray rectangular boxes are drawn to the screen. We perform > extremely badly when this happens. > > According to a profile, we seem to be spending all of our time in > DrawTargetCG::DrawSurface calling CGContextDrawImage here: > <http://mxr.mozilla.org/mozilla-central/source/gfx/2d/DrawTargetCG.cpp#264>. How do we compare to Safari on 10.6?
Also, I can't seem to be able to start playing.
(In reply to Jeff Muizelaar [:jrmuizel] from comment #1) > (In reply to Ehsan Akhgari [:ehsan] from comment #0) > > Created attachment 609507 [details] > > Instruments profile > > > > STR: > > > > 1. Open http://www.syntensity.com/static/mams/mams.html and start playing > > the game. When you finish a level, the game renders your moves during that > > level as the two gray rectangular boxes are drawn to the screen. We perform > > extremely badly when this happens. > > > > According to a profile, we seem to be spending all of our time in > > DrawTargetCG::DrawSurface calling CGContextDrawImage here: > > <http://mxr.mozilla.org/mozilla-central/source/gfx/2d/DrawTargetCG.cpp#264>. > > How do we compare to Safari on 10.6? Safari doesn't support typed arrays so I can't really tell... (In reply to Jeff Muizelaar [:jrmuizel] from comment #2) > Also, I can't seem to be able to start playing. This is due to another bug, which I have fixed. A new version of the game which does not have that bug will be available in a few minutes.
I see this on Linux as well. Looks like CPU usage goes up when showing the replay stuff, and also when showing a dialog box when you walk on it. Something to do with blitting (drawImage) with alpha perhaps?
OS: Mac OS X → All
Hardware: x86 → All
I uploaded a new version of the game with ehsan's fixes, should work everywhere now.
Whiteboard: [games:p2]
Flags: needinfo?(jmuizelaar)
(In reply to Alon Zakai (:azakai) from comment #5) > I uploaded a new version of the game with ehsan's fixes, should work > everywhere now. The game is gone :(
Flags: needinfo?(jmuizelaar)
Need to re-evaluate this when it's back.
Whiteboard: [games:p2] → [games:p?]
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Whiteboard: [games:p?]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: