Last Comment Bug 667461 - Biolab disaster is slow with Azure enabled
: Biolab disaster is slow with Azure enabled
Status: VERIFIED FIXED
: regression
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: Trunk
: All Other
: -- normal (vote)
: mozilla7
Assigned To: Bas Schouten (:bas.schouten)
:
: Milan Sreckovic [:milan]
Mentors:
http://playbiolab.com/
: 668532 (view as bug list)
Depends on:
Blocks: 651858
  Show dependency treegraph
 
Reported: 2011-06-27 08:13 PDT by Csaba Kozák [:WonderCsabo]
Modified: 2013-12-27 14:32 PST (History)
11 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Cache ThebesSurface for a frequently drawn Azure canvas. (2.35 KB, patch)
2011-06-27 17:56 PDT, Bas Schouten (:bas.schouten)
roc: review+
Details | Diff | Splinter Review
Cache ThebesSurface for a frequently drawn Azure canvas. v2 (3.15 KB, patch)
2011-06-28 20:27 PDT, Bas Schouten (:bas.schouten)
roc: review+
Details | Diff | Splinter Review
Add a test to check for reset working right (2.28 KB, patch)
2011-06-28 21:15 PDT, Bas Schouten (:bas.schouten)
no flags Details | Diff | Splinter Review

Description Csaba Kozák [:WonderCsabo] 2011-06-27 08:13:20 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110627 Firefox/7.0a1
Build ID: 20110627030739

Steps to reproduce:

The game is significantly slower with Azure enabled than with Azure disabled.

STR:
1. Open http://playbiolab.com/
2. Play with the game. It's laggy.
3. Toggle the gfx.canvas.azure.enabled variable to false in about:config. Restart the browser.
4. The game is smooth.
Comment 1 Csaba Kozák [:WonderCsabo] 2011-06-27 08:17:11 PDT
Turning off only D2D also resolves the problem, but i guess this is because that turns of Azure, too.
Comment 2 Theliel 2011-06-27 08:41:57 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110627 Firefox/7.0a1
Graphic Adapter: nVidia GTX460, Drivers: 275.50

I can confirm too, maybe the same shadow/nvidia bug like 667317?
Comment 3 Csaba Kozák [:WonderCsabo] 2011-06-27 09:07:54 PDT
I only know that it's not Nvidia-specific. Also laggy with an AMD HD4300 with Azure enabled.
Comment 4 Bas Schouten (:bas.schouten) 2011-06-27 16:56:40 PDT
I suspect this may be the same needless shadow rendering bug. I'll come up with a patch for this tomorrow probably.
Comment 5 Bas Schouten (:bas.schouten) 2011-06-27 17:52:26 PDT
The cause here is not needless shadow drawing, but a lot of calls to 'GetThebesSurface' because of DrawImage using a canvas as source. The easiest way to fix this is by caching the thebes surface after the first call to GetThebesSurface.
Comment 6 Bas Schouten (:bas.schouten) 2011-06-27 17:56:38 PDT
Created attachment 542349 [details] [diff] [review]
Cache ThebesSurface for a frequently drawn Azure canvas.
Comment 7 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-06-27 18:51:21 PDT
Comment on attachment 542349 [details] [diff] [review]
Cache ThebesSurface for a frequently drawn Azure canvas.

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

Please document in gfxPlatform.h that GetThebesSurfaceForDrawTarget must return a "live" surface, not a snapshot (assuming DrawTarget::Flush() is called)
Comment 8 Bas Schouten (:bas.schouten) 2011-06-27 21:46:05 PDT
Landed on mozilla-inbound:

http://hg.mozilla.org/integration/mozilla-inbound/rev/dc809c612dee
Comment 9 Marco Bonardo [::mak] 2011-06-28 02:05:55 PDT
Backed out from inbound due to a permaorange in a Panorama test on Windows 7 (looks like it is checking edge pixels colors)

TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/tabview/browser_tabview_bug594958.js | data:text/html,<html><body style="background-color: %2300f;"></body></html>: bottom edge color matches pixel value
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/tabview/browser_tabview_bug594958.js | data:text/html,<html><body style="background-color: %2300f;"></body></html>: right edge color matches pixel value
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/tabview/browser_tabview_bug594958.js | data:text/html,<html><body style="background-color: %2300f;"></body></html>: bottom edge color matches pixel value
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/tabview/browser_tabview_bug594958.js | data:text/html,<html><body style="background-color: %2300f;"></body></html>: right edge color matches pixel value
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/tabview/browser_tabview_bug594958.js | data:text/html,<html><body style="background-color: %2300f;"></body></html>: bottom edge color matches pixel value
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/tabview/browser_tabview_bug594958.js | data:text/html,<html><body style="background-color: %2300f;"></body></html>: right edge color matches pixel value
Comment 10 Bas Schouten (:bas.schouten) 2011-06-28 20:27:28 PDT
Created attachment 542716 [details] [diff] [review]
Cache ThebesSurface for a frequently drawn Azure canvas. v2

The old test had a mistake, it didn't clear the thebessurface when it reset (and changed DrawTargets), this caused a test failure. This patch addresses that.
Comment 11 Bas Schouten (:bas.schouten) 2011-06-28 21:15:26 PDT
Created attachment 542720 [details] [diff] [review]
Add a test to check for reset working right

This adds a test that checks specifically if a canvas drawn to another canvas works right even after the source canvas has been reset. This catches specifically the bug the earlier patch was causing.
Comment 12 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-06-29 15:59:41 PDT
Comment on attachment 542716 [details] [diff] [review]
Cache ThebesSurface for a frequently drawn Azure canvas. v2

Review of attachment 542716 [details] [diff] [review]:
-----------------------------------------------------------------
Comment 13 Bas Schouten (:bas.schouten) 2011-06-29 18:04:06 PDT
Landed on mozilla-inbound:

http://hg.mozilla.org/integration/mozilla-inbound/rev/f60a4e91a057
Comment 14 Marco Bonardo [::mak] 2011-06-30 06:11:43 PDT
http://hg.mozilla.org/mozilla-central/rev/f60a4e91a057
Comment 15 Oskar Ivanić (:icecold) 2011-06-30 10:55:14 PDT
*** Bug 668532 has been marked as a duplicate of this bug. ***
Comment 16 AndreiD[QA] 2011-07-07 07:30:31 PDT
The issue reported is not reproducible anymore. Verified fixed on:

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a2) Gecko/20110706 Firefox/7.0a2
Mozilla/5.0 (X11; Linux i686; rv:7.0a2) Gecko/20110706 Firefox/7.0a2
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0a2) Gecko/20110706 Firefox/7.0a2

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