Biolab disaster is slow with Azure enabled

VERIFIED FIXED in mozilla7

Status

()

Core
Canvas: 2D
VERIFIED FIXED
6 years ago
4 years ago

People

(Reporter: WonderCsabo, Assigned: bas)

Tracking

({regression})

Trunk
mozilla7
All
Other
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

6 years ago
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.
(Reporter)

Comment 1

6 years ago
Turning off only D2D also resolves the problem, but i guess this is because that turns of Azure, too.
Blocks: 651858
(Reporter)

Updated

6 years ago

Comment 2

6 years ago
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?
tracking-firefox7: --- → ?
Keywords: regression
(Reporter)

Comment 3

6 years ago
I only know that it's not Nvidia-specific. Also laggy with an AMD HD4300 with Azure enabled.
(Assignee)

Comment 4

6 years ago
I suspect this may be the same needless shadow rendering bug. I'll come up with a patch for this tomorrow probably.
(Assignee)

Comment 5

6 years ago
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
(Assignee)

Comment 6

6 years ago
Created attachment 542349 [details] [diff] [review]
Cache ThebesSurface for a frequently drawn Azure canvas.
Attachment #542349 - Flags: review?(roc)
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+
(Assignee)

Comment 8

6 years ago
Landed on mozilla-inbound:

http://hg.mozilla.org/integration/mozilla-inbound/rev/dc809c612dee
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
(Assignee)

Comment 10

6 years ago
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.
Attachment #542349 - Attachment is obsolete: true
Attachment #542716 - Flags: review?(roc)
(Assignee)

Comment 11

6 years ago
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 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+
(Assignee)

Comment 13

6 years ago
Landed on mozilla-inbound:

http://hg.mozilla.org/integration/mozilla-inbound/rev/f60a4e91a057
http://hg.mozilla.org/mozilla-central/rev/f60a4e91a057
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Duplicate of this bug: 668532

Updated

6 years ago
tracking-firefox7: ? → ---

Comment 16

6 years ago
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.