image/test/reftest/pngsuite-ancillary/qcms-asm-check.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/image/test/reftest/pngsuite-ancillary/qcms-asm-check.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +// This is a workaround for bug 465088, that the qcms assembly doesn't
     1.5 +// quite match the non-assembly output.
     1.6 +
     1.7 +function check_qcms_has_assembly()
     1.8 +{
     1.9 +    // We have assembly code on x86 and x86_64 architectures.
    1.10 +    // Unfortunately, detecting that is a little complicated.
    1.11 +
    1.12 +    if (navigator.platform == "MacIntel") {
    1.13 +        return true;
    1.14 +    }
    1.15 +
    1.16 +    if (navigator.platform.indexOf("Win") == 0 || navigator.platform == "OS/2") {
    1.17 +        // Assume all Windows and OS/2 is x86 or x86_64.  We don't
    1.18 +        // expose any way for Web content to check.
    1.19 +        return true;
    1.20 +    }
    1.21 +
    1.22 +    // On most Unix-like platforms, navigator.platform is basically
    1.23 +    // |uname -sm|.
    1.24 +    if (navigator.platform.match(/(i[3456]86|x86_64|amd64|i86)/)) {
    1.25 +        return true;
    1.26 +    }
    1.27 +
    1.28 +    return false;
    1.29 +}
    1.30 +
    1.31 +var qcms_has_assembly = check_qcms_has_assembly();

mercurial