Last Comment Bug 620216 - [D2D] [CANVAS] Craftymind - HTML5 Video Destruction - slow blow up
: [D2D] [CANVAS] Craftymind - HTML5 Video Destruction - slow blow up
Status: RESOLVED FIXED
: perf
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: ---
Assigned To: Bas Schouten (:bas.schouten)
:
Mentors:
http://craftymind.com/factory/html5vi...
Depends on:
Blocks: 600390 587316
  Show dependency treegraph
 
Reported: 2010-12-19 03:11 PST by MrX1980
Modified: 2011-05-23 15:09 PDT (History)
13 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
about:support (3.19 KB, text/plain)
2010-12-19 03:12 PST, MrX1980
no flags Details
new about:support (safe-mode & clean file) and DxDiag (32/64bit) (13.98 KB, application/octet-stream)
2011-05-03 10:50 PDT, MrX1980
no flags Details
Use EXTEND_PAD when doing DrawImage rather than EXTEND_NONE (882 bytes, patch)
2011-05-17 15:47 PDT, Bas Schouten (:bas.schouten)
roc: review+
Details | Diff | Splinter Review
Part 2: Mark several reftests passing now (1.66 KB, patch)
2011-05-17 17:41 PDT, Bas Schouten (:bas.schouten)
roc: review+
Details | Diff | Splinter Review

Description MrX1980 2010-12-19 03:11:52 PST
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9pre) Gecko/20101218 Firefox/4.0b9pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9pre) Gecko/20101218 Firefox/4.0b9pre

Hello

compared to other browsers the blowing is slow.

- Internet Explorer 9 pre 7
- Opera 11 (1156)
- Google Chrome 10.0.614.0 canary build

Please try to speed it up.

Thanks

Reproducible: Always

Steps to Reproduce:
1. open the url
2. click (repeatedly) on the video
Comment 1 MrX1980 2010-12-19 03:12:18 PST
Created attachment 498593 [details]
about:support
Comment 2 Ed Morley [:emorley] 2011-05-02 18:03:32 PDT
Reporter, please can you confirm whether this issue still occurs using Firefox 4.0.1 (http://www.mozilla.com/firefox/new/) or higher, in Firefox safe mode (http://support.mozilla.com/kb/Safe+Mode) and/or with a clean profile (http://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile). Ideally, also check using the latest nightly: http://nightly.mozilla.org/

If this issue no longer occurs, please close as "Resolved Worksforme".

It it in fact still occurs, please provide as much extra information as possible, including what versions tried, whether safe mode/new profile tested etc. Thanks! :-)

(Template reply to inactive UNCO bugs)
Comment 3 MrX1980 2011-05-03 10:48:39 PDT
Hello Ed Morley

I have tested it now with the Nightly again:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a1) Gecko/20110503 Firefox/6.0a1

In safe mode it is fast.
With a clean profile it is slow.

It seams to have something to do with the Direct2D acceleration.
If I set:
gfx.direct2d.disabled;true = fast
gfx.direct2d.disabled;false = slow

If you like I can create videos next weekend.
I will now attach the new about:support and DxDiag files.
Comment 4 MrX1980 2011-05-03 10:50:23 PDT
Created attachment 529751 [details]
new about:support (safe-mode & clean file) and DxDiag (32/64bit)
Comment 5 Ed Morley [:emorley] 2011-05-06 18:48:42 PDT
Thanks for the extra info.

Can you try updating your graphics card driver and seeing it that helps please:
http://www.nvidia.com/Download/index.aspx
Comment 6 MrX1980 2011-05-17 09:11:36 PDT
It is still the same with v275.27 beta drivers and Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a1) Gecko/20110517 Firefox/6.0a1

Do you need videos of it?
Comment 7 Csaba Kozák [:WonderCsabo] 2011-05-17 10:39:22 PDT
Confirmed with build: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a1) Gecko/20110517 Firefox/6.0a1

D2D enabled: slow.
D2D disabled: fast.

CC'ing Bas.
Comment 8 Bas Schouten (:bas.schouten) 2011-05-17 10:42:48 PDT
Odd, this seems to perform just fine for me :s
Comment 9 Bas Schouten (:bas.schouten) 2011-05-17 10:45:12 PDT
Hrm, on another machine with an NVidia card I can reproduce this, I'll have a more detailed look soon.
Comment 10 Alice0775 White 2011-05-17 10:49:28 PDT
Confirmed on
http://hg.mozilla.org/mozilla-central/rev/f717485edc51
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a1) Gecko/20110517 Firefox/6.0a1 ID:20110517030625

Graphics
  Adapter Description: ATI Radeon HD 4300/4500 Series
  Vendor ID: 1002
  Device ID: 954f
  Adapter RAM: 512
  Adapter Drivers: aticfx64 aticfx64 aticfx32 aticfx32 atiumd64 atidxx64 atiumdag atidxx32 atiumdva atiumd6a atitmm64
  Driver Version: 8.850.0.0
  Driver Date: 4-19-2011
  Direct2D Enabled: true
  DirectWrite Enabled: true (6.1.7601.17563)
  ClearType Parameters: Gamma: 2200 Pixel Structure: RGB ClearType Level: 50 Enhanced Contrast: 50 
  WebGL Renderer: Google Inc. -- ANGLE -- OpenGL ES 2.0 (ANGLE 0.0.0.611)
  GPU Accelerated Windows: 1/1 Direct3D 10


Regression window(m-c):
Works:
http://hg.mozilla.org/mozilla-central/rev/656d99ca089c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100814 Minefield/4.0b4pre ID:20100814040443
Fails:
http://hg.mozilla.org/mozilla-central/rev/bffe7baa4e00
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100813 Minefield/4.0b4pre ID:20100816004710
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=656d99ca089c&tochange=bffe7baa4e00

Note:
Between the above range it is hard-coded to dusable D2D, so I cannot bisect without local build.
Comment 11 Alice0775 White 2011-05-17 10:50:20 PDT
s/dusable/disable/
Comment 12 Csaba Kozák [:WonderCsabo] 2011-05-17 11:52:14 PDT
I reproduced on this hardware:

Adapter: NVIDIA GeForce 8800 GT
Vendor ID: 10de
Device ID: 0611
Adapter RAM: 512
Adapter drivers: nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Driver version: 8.17.12.7061
Driver date: 4-7-2011
Direct2D enabled: true
DirectWrite enabled: true (6.1.7601.17563)
ClearType Parameters: ClearType parameters not found
WebGL Renderer: NVIDIA Corporation -- GeForce 8800 GT/PCI/SSE2 -- 3.3.0
GPU Accelerated Windows: 1/1 Direct3D 10
Comment 13 Gary [:streetwolf] 2011-05-17 12:27:31 PDT
Runs fine on:

Adapter Description AMD Radeon HD 6900 Series
Vendor ID 1002
Device ID 6718
Adapter RAM 2048
Adapter Driver saticfx64 aticfx64 aticfx64 aticfx32 aticfx32 aticfx32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64
Driver Version 8.850.6.0
Driver Date 5-5-2011
Direct2D Enabledtrue
DirectWrite Enabled true (6.1.7601.17563)
ClearType Parameters DISPLAY1 [ Gamma: 2200 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 100 ] DISPLAY4 [ Gamma: 2200 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 100 ]
WebGL Renderer: Google Inc. -- ANGLE -- OpenGL ES 2.0 (ANGLE 0.0.0.611)
GPU Accelerated Windows1/1 Direct3D 10
Comment 14 Zsolt Torok (:psishock) 2011-05-17 12:32:09 PDT
gfx.direct2d.disabled;true = fast, but look at the edges of those rectangles. Every piece is rendered totally aliased. 
gfx.direct2d.disabled;false = slow(er a bit on my build), but all the little pieces are nicely anti-aliased. This could reasonably eat up processing a lot more processing power, thus the slowdown.
Comment 15 Alice0775 White 2011-05-17 13:07:42 PDT
In local build(Force enabled D2D):
build from 0fb6352dc09c + f2959b949445 : fails
build from 07822d2a6758 + f2959b949445 :works
So, Triggered by:
Bug 587316 - [d2d] Fix mochitest canvas mochitest failures
Comment 16 Bas Schouten (:bas.schouten) 2011-05-17 13:16:56 PDT
(In reply to comment #15)
> In local build(Force enabled D2D):
> build from 0fb6352dc09c + f2959b949445 : fails
> build from 07822d2a6758 + f2959b949445 :works
> So, Triggered by:
> Bug 587316 - [d2d] Fix mochitest canvas mochitest failures

Hrm that's interesting, and a little surprising, I wonder what part of that patch did it.
Comment 17 Bas Schouten (:bas.schouten) 2011-05-17 13:19:24 PDT
I suspect this is because of DrawImage using EXTEND_NONE, shouldn't be hard to fix.
Comment 18 Alice0775 White 2011-05-17 13:34:53 PDT
(In reply to comment #17)
> I suspect this is because of DrawImage using EXTEND_NONE, shouldn't be hard
> to fix.

Yes,
build from 055a407bb683 + f2959b949445 : fails
build from 1d7c15818f66 + f2959b949445 :works
Triggered by:
055a407bb683	Bas Schouten — Bug 587316 - Part 4: Support CAIRO_EXTEND_NONE for D2D source surfaces. r=jrmuizel
Comment 19 Bas Schouten (:bas.schouten) 2011-05-17 15:47:24 PDT
Created attachment 533095 [details] [diff] [review]
Use EXTEND_PAD when doing DrawImage rather than EXTEND_NONE

This patch fixes the bug. In general EXTEND_PAD should generate better results than EXTEND_NONE for DrawImage.
Comment 20 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-05-17 16:05:07 PDT
Comment on attachment 533095 [details] [diff] [review]
Use EXTEND_PAD when doing DrawImage rather than EXTEND_NONE

Review of attachment 533095 [details] [diff] [review]:
-----------------------------------------------------------------
Comment 21 Bas Schouten (:bas.schouten) 2011-05-17 16:13:16 PDT
http://hg.mozilla.org/mozilla-central/rev/eb3239a968ac
Comment 22 Bas Schouten (:bas.schouten) 2011-05-17 17:26:08 PDT
This caused a reftest failure on linux, need to figure out why and fix.
Comment 23 Bas Schouten (:bas.schouten) 2011-05-17 17:41:03 PDT
Created attachment 533136 [details] [diff] [review]
Part 2: Mark several reftests passing now

Due to no longer sampling transparent pixels wrongfully, three reftests are no longer failing on none-MacOSX (where EXTEND_NONE doesn't behave according to the cairo specification).

This marks them passing everywhere now.
Comment 24 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2011-05-17 18:50:46 PDT
Comment on attachment 533136 [details] [diff] [review]
Part 2: Mark several reftests passing now

Review of attachment 533136 [details] [diff] [review]:
-----------------------------------------------------------------

Nice!
Comment 26 Asa Dotzler [:asa] 2011-05-19 12:13:14 PDT
scoobidiver, has this spiked up in crash reports? Why did you nominate it as a concern for Firefox 5?
Comment 27 Scoobidiver (away) 2011-05-19 14:27:29 PDT
(In reply to comment #26)
> has this spiked up in crash reports?
It is not a crash but a perf issue discovered in Firefox 4.

> Why did you nominate it as a concern for Firefox 5?
According to me, a single patch that is validated must be transfered to Firefox 5. By single patch, I mean a fix and not something that is caused by a new feature. Only a verified status is needed in order to do the transfer.
Comment 28 Bas Schouten (:bas.schouten) 2011-05-19 14:29:52 PDT
(In reply to comment #27)
> (In reply to comment #26)
> > has this spiked up in crash reports?
> It is not a crash but a perf issue discovered in Firefox 4.
> 
> > Why did you nominate it as a concern for Firefox 5?
> According to me, a single patch that is validated must be transfered to
> Firefox 5. By single patch, I mean a fix and not something that is caused by
> a new feature. Only a verified status is needed in order to do the transfer.

Although I'd gladly see this in Firefox 5. Since this is not a regression in 4 I doubt it is eligible to be merged onto Firefox 5 if I understand our criteria correctly.
Comment 29 Scoobidiver (away) 2011-05-19 15:20:46 PDT
(In reply to comment #28)
> Although I'd gladly see this in Firefox 5. Since this is not a regression in
> 4 I doubt it is eligible to be merged onto Firefox 5 if I understand our
> criteria correctly.
You don't. I meant, a bug in Firefox 4 that has been fixed and verified in mozilla-central must be transfered to Firefox 5, except if the bug fix is a new Firefox 6 feature.
Comment 30 Asa Dotzler [:asa] 2011-05-19 15:33:10 PDT
The criteria for getting into Firefox 5 at this late stage is stringent. It must be very high value and well understood. We must also have solid confidence that it doesn't break anything. I don't think that this change qualifies.
Comment 31 Robert Sayre 2011-05-23 15:09:21 PDT
Ask an for an approval on the patch.

Note You need to log in before you can comment on or make changes to this bug.