From 55fc81be8bc9a2839506768601348f5eef66893c Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Fri, 25 Sep 2015 13:30:57 +0000 Subject: [PATCH] Bug 1208465 - Part 2: Disable using Direct2D when 1.1 is unavailable. r=jrmuizel --- gfx/tests/mochitest/test_acceleration.html | 10 +++++----- gfx/thebes/gfxPrefs.h | 1 + gfx/thebes/gfxWindowsPlatform.cpp | 4 ++++ .../2d.gradient.interpolate.overlap.html.ini | 2 -- .../2d.gradient.radial.outside3.html.ini | 2 ++ .../path-objects/2d.path.arc.selfintersect.1.html.ini | 1 - .../path-objects/2d.path.arc.shape.3.html.ini | 2 +- .../path-objects/2d.path.arcTo.shape.curve1.html.ini | 1 + .../path-objects/2d.path.arcTo.shape.curve2.html.ini | 1 + .../path-objects/2d.path.rect.zero.3.html.ini | 2 -- .../path-objects/2d.path.stroke.prune.arc.html.ini | 2 -- .../path-objects/2d.path.stroke.prune.closed.html.ini | 2 -- .../path-objects/2d.path.stroke.prune.curve.html.ini | 2 -- .../path-objects/2d.path.stroke.prune.line.html.ini | 2 -- .../path-objects/2d.path.stroke.prune.rect.html.ini | 2 -- .../path-objects/2d.path.stroke.scale2.html.ini | 2 -- 16 files changed, 15 insertions(+), 23 deletions(-) diff --git a/gfx/tests/mochitest/test_acceleration.html b/gfx/tests/mochitest/test_acceleration.html index 2da042547db1..38014760ccf3 100644 --- a/gfx/tests/mochitest/test_acceleration.html +++ b/gfx/tests/mochitest/test_acceleration.html @@ -84,12 +84,12 @@ switch(osName) } var gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo); - if (version < 6.0) { - ok(!gfxInfo.D2DEnabled, "Direct2D not supported on Windows 2003 or older"); - ok(!gfxInfo.DWriteEnabled, "DirectWrite not supported on Windows 2003 or older"); + if (version < 6.2) { + ok(!gfxInfo.D2DEnabled, "Direct2D not supported on Windows 2008 or older"); + ok(!gfxInfo.DWriteEnabled, "DirectWrite not supported on Windows 2008 or older"); } else { - ok(gfxInfo.D2DEnabled, "Direct2D enabled on Windows Vista or newer"); - ok(gfxInfo.DWriteEnabled, "DirectWrite enabled on Windows Vista or newer"); + ok(gfxInfo.D2DEnabled, "Direct2D enabled on Windows 8 or newer"); + ok(gfxInfo.DWriteEnabled, "DirectWrite enabled on Windows 8 or newer"); } break; diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index 71aef73568b7..3eb088711359 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -240,6 +240,7 @@ private: DECL_GFX_PREF(Once, "gfx.direct2d.disabled", Direct2DDisabled, bool, false); DECL_GFX_PREF(Once, "gfx.direct2d.force-enabled", Direct2DForceEnabled, bool, false); DECL_GFX_PREF(Live, "gfx.direct2d.use1_1", Direct2DUse1_1, bool, false); + DECL_GFX_PREF(Live, "gfx.direct2d.allow1_0", Direct2DAllow1_0, bool, false); DECL_GFX_PREF(Live, "gfx.draw-color-bars", CompositorDrawColorBars, bool, false); DECL_GFX_PREF(Live, "gfx.gralloc.fence-with-readpixels", GrallocFenceWithReadPixels, bool, false); DECL_GFX_PREF(Live, "gfx.layerscope.enabled", LayerScopeEnabled, bool, false); diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index ed4113be91f4..81e02ba38971 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -598,6 +598,10 @@ gfxWindowsPlatform::CreateDevice(nsRefPtr &adapter1, void gfxWindowsPlatform::VerifyD2DDevice(bool aAttemptForce) { + if (!Factory::SupportsD2D1() && !gfxPrefs::Direct2DAllow1_0()) { + return; + } + #ifdef CAIRO_HAS_D2D_SURFACE if (mD3D10Device) { if (SUCCEEDED(mD3D10Device->GetDeviceRemovedReason())) { diff --git a/testing/web-platform/meta/2dcontext/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html.ini b/testing/web-platform/meta/2dcontext/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html.ini index 3d722a655d3a..5a629f1f79e4 100644 --- a/testing/web-platform/meta/2dcontext/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html.ini +++ b/testing/web-platform/meta/2dcontext/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html.ini @@ -3,9 +3,7 @@ [Canvas test: 2d.gradient.interpolate.overlap] expected: if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL diff --git a/testing/web-platform/meta/2dcontext/fill-and-stroke-styles/2d.gradient.radial.outside3.html.ini b/testing/web-platform/meta/2dcontext/fill-and-stroke-styles/2d.gradient.radial.outside3.html.ini index fea3df5aebf4..a61e8294803a 100644 --- a/testing/web-platform/meta/2dcontext/fill-and-stroke-styles/2d.gradient.radial.outside3.html.ini +++ b/testing/web-platform/meta/2dcontext/fill-and-stroke-styles/2d.gradient.radial.outside3.html.ini @@ -4,5 +4,7 @@ expected: if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL + if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL + if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if os == "mac": FAIL diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.arc.selfintersect.1.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.arc.selfintersect.1.html.ini index b05a8caededc..88beb26754b1 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.arc.selfintersect.1.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.arc.selfintersect.1.html.ini @@ -5,7 +5,6 @@ if (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL if (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL - if (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.arc.shape.3.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.arc.shape.3.html.ini index c5e7c5123824..1241415518dc 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.arc.shape.3.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.arc.shape.3.html.ini @@ -5,5 +5,5 @@ if (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL if (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL - if (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL + diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.arcTo.shape.curve1.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.arcTo.shape.curve1.html.ini index 32da8e207224..f93da15c73a4 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.arcTo.shape.curve1.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.arcTo.shape.curve1.html.ini @@ -4,5 +4,6 @@ expected: if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL + if (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if os == "mac": FAIL diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.arcTo.shape.curve2.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.arcTo.shape.curve2.html.ini index c01b1c224978..95953d2800d0 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.arcTo.shape.curve2.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.arcTo.shape.curve2.html.ini @@ -4,5 +4,6 @@ expected: if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL + if (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if os == "mac": FAIL diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.rect.zero.3.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.rect.zero.3.html.ini index 0dfd545b1f95..af7ae7992452 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.rect.zero.3.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.rect.zero.3.html.ini @@ -3,9 +3,7 @@ [Canvas test: 2d.path.rect.zero.3] expected: if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.arc.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.arc.html.ini index 82c62019f25e..897bedd03f51 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.arc.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.arc.html.ini @@ -5,11 +5,9 @@ if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL - if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.closed.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.closed.html.ini index 6123a571349f..fbf5e50c08fb 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.closed.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.closed.html.ini @@ -5,11 +5,9 @@ if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL - if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.curve.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.curve.html.ini index 052adcb6e497..bff057ced1d0 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.curve.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.curve.html.ini @@ -5,11 +5,9 @@ if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL - if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.line.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.line.html.ini index 8986dff055de..1168046348fe 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.line.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.line.html.ini @@ -5,11 +5,9 @@ if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL - if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.rect.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.rect.html.ini index d637351d9715..20f4c483acd0 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.rect.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.prune.rect.html.ini @@ -5,11 +5,9 @@ if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL - if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL diff --git a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.scale2.html.ini b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.scale2.html.ini index 5dc5848be77e..aee019024516 100644 --- a/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.scale2.html.ini +++ b/testing/web-platform/meta/2dcontext/path-objects/2d.path.stroke.scale2.html.ini @@ -3,9 +3,7 @@ [Stroke line widths are scaled by the current transformation matrix] expected: if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL - if debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL