Closed Bug 870390 Opened 7 years ago Closed 7 years ago

Story - Disable forced D2D backend in metro

Categories

(Firefox for Metro Graveyard :: General, defect, P1)

x86_64
Windows 8.1
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jimm, Assigned: jimm)

References

Details

(Whiteboard: feature=story c=graphic_display_features u=metro_firefox_user p=3 status=verified)

Attachments

(1 file)

I'm not entirely sure what we've done here, but now that omtc has landed, we should be able to remove any custom settings and let the gfx/widget backend handle making its own decisions.
Depends on: 866852
What happens if d2d is blocked due to the driver?
(In reply to Masatoshi Kimura [:emk] from comment #2)
> What happens if d2d is blocked due to the driver?

As things are now, we use the driver anyway. With OMTC, we should automatically fall back to cairo for blocked d2d drivers, but still composite and paint to the screen using D3D.
Duplicate of this bug: 858144
bug 861525 is an artifact of the current behavior of using blocked drivers.
Attached patch patchSplinter Review
I've tested locally with this patch plus with d2dDisabled forced to true, and everything rendered fine.

I fired up a try build with this and omtc enabled for some atom testing - 

https://tbpl.mozilla.org/?tree=Try&showall=0&rev=bfff4f520592
Assignee: nobody → jmathies
Hmm, may have spoken too soon. With this patch and omtc enabled, when I flip gfx.direct2d.disabled to true I get a crash in cairo trying to create surface.
brain dump:

I can get cairo running with omtc, I just have to force it on via code. A couple notes - 

* adding:

pref("layers.offmainthreadcomposition.enabled", true);
pref("gfx.direct2d.disabled", true);
pref("gfx.direct2d.force-enabled", false);

to metro.js doesn't seem to force d2d off. We'll need to figure this out.

* you can force 2d2 off with the patch I posed plus:

d2dBlocked = true;

here - 
http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxWindowsPlatform.cpp#428

* flipping gfx.direct2d.disabled while running causes a crash
Assignee: jmathies → nobody
Summary: Disable forced D2D backed in metro → Disable forced D2D backend in metro
Summary: Disable forced D2D backend in metro → Story - Disable forced D2D backend in metro
Whiteboard: feature=story c=tbd u=tbd p=tbd
Whiteboard: feature=story c=tbd u=tbd p=tbd → feature=story c=graphic_display_features u=metro_firefox_user p=0
How do we apply the patch?
(In reply to reekotubbs from comment #9)
> How do we apply the patch?

Found that by adding

user_pref("layers.offmainthreadcomposition.enabled", true);
user_pref("gfx.direct2d.disabled", true);
user_pref("gfx.direct2d.force-enabled", false);

to the metro prefs.js the problem with the black overlay seems to be solved and solves the problem with "flipping gfx.direct2d.disabled while running causes a crash"

Thanks to  Jim Mathies' comments in comment 8.

This works for me on Samsung ATIV 500 with Intel Atom z2760 1.8ghz
Depends on: 861525
Assignee: nobody → jmathies
Whiteboard: feature=story c=graphic_display_features u=metro_firefox_user p=0 → feature=story c=graphic_display_features u=metro_firefox_user p=3
Blocks: metrov1it10
No longer blocks: metrov1backlog
Status: NEW → ASSIGNED
QA Contact: jbecerra
Ok I think we are good shape here, using gfx.direct2d.disabled = true on a surface pro:

Graphics
--------

Adapter Description: Intel(R) HD Graphics 4000
Adapter Drivers: igdumd64 igd10umd64 igd10umd64 igdumd32 igd10umd32 igd10umd32
Adapter RAM: Unknown
Device ID: 0x0166
DirectWrite Enabled: false (6.2.9200.16433)
Driver Date: 3-8-2013
Driver Version: 9.17.10.3062
GPU #2 Active: false
GPU Accelerated Windows: 1/1 Direct3D 11 (OMTC)
Vendor ID: 0x8086
WebGL Renderer: Google Inc. -- ANGLE (Intel(R) HD Graphics 4000 Direct3D9Ex vs_3_0 ps_3_0)
windowLayerManagerRemote: true
AzureCanvasBackend: skia
AzureContentBackend: none
AzureFallbackCanvasBackend: cairo

Lets land this patch. Then we can go through the normal qa process to find the new systems we want to blacklist from the d2d rendering backend.
Attachment #748070 - Flags: review?(netzen)
Comment on attachment 748070 [details] [diff] [review]
patch

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

Sweet
Attachment #748070 - Flags: review?(netzen) → review+
https://hg.mozilla.org/mozilla-central/rev/8d8e2e2734fc
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Priority: -- → P1
Can you please provide detail steps to test this?
Flags: needinfo?(jmathies)
(In reply to Samvedana (:Samvedana) from comment #15)
> Can you please provide detail steps to test this?

You would need a device we have the 2d2 backend blacklisted for. Someone with an atom tablet should be able to do this. They can confirm the cairo backend is in use by looking at about:support gfx info.
Flags: needinfo?(jmathies)
Tested on 2013-07-17 using latest nightly.

- I tested by changing the preference value and checking the information in about:support as in comment #11.
- On an Atom tablet, with 2d2 blocked, the graphics information in about:support had the following at the bottom:

AzureCanvasBackend: skia
AzureContentBackend: none
AzureFallbackCanvasBackend: cairo
Status: RESOLVED → VERIFIED
Whiteboard: feature=story c=graphic_display_features u=metro_firefox_user p=3 → feature=story c=graphic_display_features u=metro_firefox_user p=3 status=verified
It states verified fixed at top, does this mean that this fix has been merged with nightly branch?
Yep, all resolved and verified bugs have landed on m-c, which is used to create the Nightly channel build.  You can also tell based on the links posted in bugs such as Comment 14.
Thanks for the clarification. A similar problem has been introduced in win 8.1 preview. Maybe that problem deals with the change to the preferences.
(In reply to reekotubbs from comment #20)
> Thanks for the clarification. A similar problem has been introduced in win
> 8.1 preview. Maybe that problem deals with the change to the preferences.

Likely, see bug 901071 which I was working on today.
User Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:26.0) Gecko/20100101 Firefox/26.0
Build ID: 20130807030216
Built from http://hg.mozilla.org/mozilla-central/rev/1fb5d14e8348

WFM
Tested on windows 8 using latest nightly  for iteration-11. 
On an Atom tablet, with 2d2 blocked, the graphics information in about:support had the following at the bottom:

AzureCanvasBackend: skia
AzureContentBackend: none
AzureFallbackCanvasBackend: cairo
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
Build ID: 20130816030205
Built from http://hg.mozilla.org/mozilla-central/rev/1ed5a88cd4d0

Didn't WFM
Tested on windows 8 using latest nightly for iteration-12.

Metro Firefox could not open. It was crashing.
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.