Bug 885623 - Disable some gradient tests for SkiaGL r=gw280

This commit is contained in:
James Willcox 2013-06-24 13:32:59 -04:00
parent 52db1681c4
commit 998381af1b
3 changed files with 22 additions and 2 deletions

View File

@ -109,7 +109,7 @@ MOCHITEST_FILES = \
test_bug866575.html \
test_drawImage_edge_cases.html \
test_drawImage_document_domain.html \
test_mozDashOffset.html \
test_mozDashOffset.html \
file_drawImage_document_domain.html \
test_windingRuleUndefined.html \
$(NULL)
@ -140,8 +140,11 @@ MOCHITEST_FILES += \
test_2d.line.join.parallel.html \
$(NULL)
ifneq ($(MOZ_WIDGET_TOOLKIT), android)
ifneq ($(MOZ_WIDGET_TOOLKIT), gonk)
# This is an issue with Quartz's handling of radial gradients and some numeric
# imprecision that results in errors here.
# imprecision that results in errors here. SkiaGL (on Android/Gonk) also has
# a similar problem.
MOCHITEST_FILES += \
test_2d.gradient.radial.inside2.html \
test_2d.gradient.radial.inside3.html \
@ -149,6 +152,8 @@ MOCHITEST_FILES += \
test_2d.gradient.radial.cone.front.html \
test_2d.gradient.radial.cone.top.html \
$(NULL)
endif
endif
# This is another Quartz bug -- closed paths that don't lie fully within the
# destination bounds seem to have problems with the BEVEL/SQUARE join/cap combo.

View File

@ -51,6 +51,17 @@ function IsAzureSkia() {
return enabled;
}
function IsAcceleratedSkia() {
var enabled = false;
try {
var props = Cc["@mozilla.org/gfx/info;1"].getService(SpecialPowers.Ci.nsIGfxInfo).getInfo();
enabled = props.AzureCanvasBackend == "skia" && props.AzureSkiaAccelerated;
} catch(e) { }
return enabled;
}
function IsAzureCairo() {
var enabled = false;
@ -6641,6 +6652,9 @@ isPixel(ctx, 98,48, 0,255,0,255, 0);
function test_2d_gradient_radial_inside1() {
if (IsAcceleratedSkia())
return;
var canvas = document.getElementById('c240');
var ctx = canvas.getContext('2d');

View File

@ -244,6 +244,7 @@ public:
void GetAzureBackendInfo(mozilla::widget::InfoObject &aObj) {
aObj.DefineProperty("AzureCanvasBackend", GetBackendName(mPreferredCanvasBackend));
aObj.DefineProperty("AzureSkiaAccelerated", UseAcceleratedSkiaCanvas());
aObj.DefineProperty("AzureFallbackCanvasBackend", GetBackendName(mFallbackCanvasBackend));
aObj.DefineProperty("AzureContentBackend", GetBackendName(mContentBackend));
}