Closed Bug 667461 Opened 14 years ago Closed 14 years ago

Biolab disaster is slow with Azure enabled

Categories

(Core :: Graphics: Canvas2D, defect)

All
Other
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla7

People

(Reporter: WonderCsabo, Assigned: bas.schouten)

References

()

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

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.
Turning off only D2D also resolves the problem, but i guess this is because that turns of Azure, too.
Blocks: 651858
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?
I only know that it's not Nvidia-specific. Also laggy with an AMD HD4300 with Azure enabled.
I suspect this may be the same needless shadow rendering bug. I'll come up with a patch for this tomorrow probably.
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.
Assignee: nobody → bas.schouten
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
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)
Attachment #542349 - Flags: review?(roc) → review+
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
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.
Attachment #542349 - Attachment is obsolete: true
Attachment #542716 - Flags: review?(roc)
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 on attachment 542716 [details] [diff] [review] Cache ThebesSurface for a frequently drawn Azure canvas. v2 Review of attachment 542716 [details] [diff] [review]: -----------------------------------------------------------------
Attachment #542716 - Flags: review?(roc) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
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
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: