Bug 1089981 - Reftest both initial and steady-state frame. - r=kamidphish

This commit is contained in:
Jeff Gilbert 2015-01-14 18:04:50 -08:00
parent b7a9b5ed13
commit edb2713dd0
17 changed files with 279 additions and 391 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -2,183 +2,143 @@
default-preferences pref(webgl.force-enabled,true)
# Check that disabling works:
== webgl-disable-test.html?nogl wrapper.html?green.png
pref(webgl.disabled,true) == webgl-disable-test.html wrapper.html?green.png
== webgl-disable-test.html?nogl wrapper.html?green.png
pref(webgl.disabled,true) == webgl-disable-test.html wrapper.html?green.png
# Basic WebGL tests:
# Do we get pixels to the screen at all?
# Try to just hit the different rendering paths here.
# Neither of these should ever break.
== webgl-clear-test.html wrapper.html?green.png
pref(webgl.force-layers-readback,true) == webgl-clear-test.html?readback wrapper.html?green.png
# Android 2.2 ARMv6 slaves can't seem to use WebGL, but we can't seem to
# disable the ARMv6 runs without disabling ARMv7, which works fine.
# For now, just mark versions <15 (<4.0) as random, so we still get
# assert coverage.
# Test: {aa, alpha, preserve, readback} = 16
random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?__&_____&________ wrapper.html?green.png
random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?aa&_____&________ wrapper.html?green.png
random-if(gtk2Widget) fuzzy-if(B2G,256,91) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?__&alpha&________ wrapper.html?green.png
random-if(gtk2Widget) fuzzy-if(B2G,256,91) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?aa&alpha&________ wrapper.html?green.png
random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?__&_____&preserve wrapper.html?green.png
random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?aa&_____&preserve wrapper.html?green.png
random-if(gtk2Widget) fuzzy-if(B2G,256,91) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?__&alpha&preserve wrapper.html?green.png
random-if(gtk2Widget) fuzzy-if(B2G,256,91) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?aa&alpha&preserve wrapper.html?green.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?readback&__&_____&________ wrapper.html?green.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?readback&aa&_____&________ wrapper.html?green.png
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) fuzzy-if(B2G,256,91) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?readback&__&alpha&________ wrapper.html?green.png
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) fuzzy-if(B2G,256,91) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?readback&aa&alpha&________ wrapper.html?green.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?readback&__&_____&preserve wrapper.html?green.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?readback&aa&_____&preserve wrapper.html?green.png
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) fuzzy-if(B2G,256,91) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?readback&__&alpha&preserve wrapper.html?green.png
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) fuzzy-if(B2G,256,91) random-if(Android&&AndroidVersion<15) == webgl-clear-test.html?readback&aa&alpha&preserve wrapper.html?green.png
# Make sure that our choice of attribs doesn't break rendering.
== webgl-clear-test.html?depth wrapper.html?green.png
== webgl-clear-test.html?stencil wrapper.html?green.png
== webgl-clear-test.html?depth&stencil wrapper.html?green.png
# Check that resize works:
random-if(Android&&AndroidVersion<15) == webgl-resize-test.html wrapper.html?green.png
== webgl-resize-test.html wrapper.html?green.png
# Check orientation:
random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?__&_____&________ wrapper.html?white-top-left.png
random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?aa&_____&________ wrapper.html?white-top-left.png
random-if(gtk2Widget) fuzzy-if(B2G,256,90) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?__&alpha&________ wrapper.html?white-top-left.png
random-if(gtk2Widget) fuzzy-if(B2G,256,90) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?aa&alpha&________ wrapper.html?white-top-left.png
random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?__&_____&preserve wrapper.html?white-top-left.png
random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?aa&_____&preserve wrapper.html?white-top-left.png
random-if(gtk2Widget) fuzzy-if(B2G,256,90) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?__&alpha&preserve wrapper.html?white-top-left.png
random-if(gtk2Widget) fuzzy-if(B2G,256,90) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?aa&alpha&preserve wrapper.html?white-top-left.png
# Some of the failure conditions are a little crazy. I'm (jgilbert) setting these based on
# failures encountered when running on Try, and then targetting the Try config by
# differences in the `sandbox` contents. That is, I'm labeling based on symptoms rather
# than cause.
# Lin-R-e10s: gtk2Widget && browserIsRemote
# WinXP-R: winWidget && layersGPUAccelerated && !d2d
# Win7+-R: winWidget && layersGPUAccelerated && d2d
# Win7+-Ru: winWidget && !layersGPUAccelerated
# (Note that we have to remove spaces when used below)
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?readback&__&_____&________ wrapper.html?white-top-left.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?readback&aa&_____&________ wrapper.html?white-top-left.png
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) fuzzy-if(B2G,256,90) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?readback&__&alpha&________ wrapper.html?white-top-left.png
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) fuzzy-if(B2G,256,90) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?readback&aa&alpha&________ wrapper.html?white-top-left.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?readback&__&_____&preserve wrapper.html?white-top-left.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?readback&aa&_____&preserve wrapper.html?white-top-left.png
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) fuzzy-if(B2G,256,90) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?readback&__&alpha&preserve wrapper.html?white-top-left.png
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) fuzzy-if(B2G,256,90) random-if(Android&&AndroidVersion<15) == webgl-orientation-test.html?readback&aa&alpha&preserve wrapper.html?white-top-left.png
# IMPORTANT: Expected outcomes are evaluated left-to-right, and they replace eachother.
# That means that if an unconditional status (`fuzzy()`) is to the right of another status
# (such as fails-if), it will overwrite the old status.
#
# As such, all unconditional statuses should be to the left of conditional statuses.
# (See /layout/tools/reftest/reftest.js:945)
# Does we draw the correct color in the correct places with all context creation options?
# (Note that our context creation option matrix is 2^6 = 64)
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&_____&_______&________&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&_____&_______&________&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&_____&_______&________&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&_____&_______&________&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&depth&_______&________&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&depth&_______&________&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&depth&_______&________&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&depth&_______&________&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&_____&premult&________&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&_____&premult&________&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&_____&premult&________&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&_____&premult&________&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&depth&premult&________&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&depth&premult&________&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&depth&premult&________&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&depth&premult&________&_______ wrapper.html?colors.png # Bug 844439
# Does we draw the correct colors in the correct places?
# Combinations: PowerSet([readback, aa, preserve, premult, alpha]) x [frame=1,frame=6]
# This is 2^6 = 64 combinations.
== webgl-color-test.html?frame=1&__&________&_______&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=1&aa&________&_______&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=1&__&preserve&_______&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=1&aa&preserve&_______&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=1&__&________&premult&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=1&aa&________&premult&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=1&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=1&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&__&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&aa&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&__&preserve&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=1&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png
== webgl-color-test.html?frame=1&__&________&premult&alpha wrapper.html?colors-premult.png
== webgl-color-test.html?frame=1&aa&________&premult&alpha wrapper.html?colors-premult.png
== webgl-color-test.html?frame=1&__&preserve&premult&alpha wrapper.html?colors-premult.png
== webgl-color-test.html?frame=1&aa&preserve&premult&alpha wrapper.html?colors-premult.png
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&_____&_______&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&_____&_______&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&_____&_______&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&_____&_______&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&depth&_______&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&depth&_______&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&depth&_______&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&depth&_______&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&_____&premult&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&_____&premult&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&_____&premult&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&_____&premult&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&depth&premult&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&depth&premult&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&depth&premult&preserve&_______ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&depth&premult&preserve&_______ wrapper.html?colors.png # Bug 844439
== webgl-color-test.html?frame=6&__&________&_______&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=6&aa&________&_______&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=6&__&preserve&_______&_____ wrapper.html?colors-no-alpha.png
fails-if(winWidget&&layersGPUAccelerated&&d2d) == webgl-color-test.html?frame=6&aa&preserve&_______&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=6&__&________&premult&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=6&aa&________&premult&_____ wrapper.html?colors-no-alpha.png
== webgl-color-test.html?frame=6&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png
fails-if(winWidget&&layersGPUAccelerated&&d2d) == webgl-color-test.html?frame=6&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=6&__&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=6&aa&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) == webgl-color-test.html?frame=6&__&preserve&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&(!layersGPUAccelerated||!d2d)) == webgl-color-test.html?frame=6&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png
== webgl-color-test.html?frame=6&__&________&premult&alpha wrapper.html?colors-premult.png
== webgl-color-test.html?frame=6&aa&________&premult&alpha wrapper.html?colors-premult.png
== webgl-color-test.html?frame=6&__&preserve&premult&alpha wrapper.html?colors-premult.png
== webgl-color-test.html?frame=6&aa&preserve&premult&alpha wrapper.html?colors-premult.png
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&_____&_______&________&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&_____&_______&________&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&_____&_______&________&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&_____&_______&________&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&depth&_______&________&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&depth&_______&________&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&depth&_______&________&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&depth&_______&________&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&_____&premult&________&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&_____&premult&________&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&_____&premult&________&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&_____&premult&________&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&depth&premult&________&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&depth&premult&________&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&depth&premult&________&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&depth&premult&________&stencil wrapper.html?colors.png # Bug 844439
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&________&_______&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&________&_______&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&preserve&_______&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&preserve&_______&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&________&premult&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&________&premult&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&preserve&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&________&premult&alpha wrapper.html?colors-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&________&premult&alpha wrapper.html?colors-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&__&preserve&premult&alpha wrapper.html?colors-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=1&readback&aa&preserve&premult&alpha wrapper.html?colors-premult.png
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&_____&_______&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&_____&_______&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&_____&_______&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&_____&_______&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&depth&_______&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&depth&_______&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&depth&_______&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&depth&_______&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&_____&premult&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&_____&premult&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&_____&premult&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&_____&premult&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&_____&depth&premult&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&_____&depth&premult&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?__&alpha&depth&premult&preserve&stencil wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?aa&alpha&depth&premult&preserve&stencil wrapper.html?colors.png # Bug 844439
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&________&_______&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&________&_______&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&preserve&_______&_____ wrapper.html?colors-no-alpha.png
fails-if(winWidget&&layersGPUAccelerated&&d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&preserve&_______&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&________&premult&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&________&premult&_____ wrapper.html?colors-no-alpha.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&preserve&premult&_____ wrapper.html?colors-no-alpha.png
random-if(winWidget&&layersGPUAccelerated&&d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&preserve&premult&_____ wrapper.html?colors-no-alpha.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&layersGPUAccelerated&&!d2d) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&preserve&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(1,30000) fails-if(gtk2Widget&&browserIsRemote) fails-if(winWidget&&(!layersGPUAccelerated||!d2d)) pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&preserve&_______&alpha wrapper.html?colors-non-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&________&premult&alpha wrapper.html?colors-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&________&premult&alpha wrapper.html?colors-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&__&preserve&premult&alpha wrapper.html?colors-premult.png
pref(webgl.force-layers-readback,true) == webgl-color-test.html?frame=6&readback&aa&preserve&premult&alpha wrapper.html?colors-premult.png
# Check for hanging bindings/state settings:
== webgl-hanging-fb-test.html?__&________ wrapper.html?green.png
== webgl-hanging-fb-test.html?aa&________ wrapper.html?green.png
== webgl-hanging-fb-test.html?__&preserve wrapper.html?green.png
== webgl-hanging-fb-test.html?aa&preserve wrapper.html?green.png
pref(webgl.force-layers-readback,true) == webgl-hanging-fb-test.html?readback&__&________ wrapper.html?green.png
pref(webgl.force-layers-readback,true) == webgl-hanging-fb-test.html?readback&aa&________ wrapper.html?green.png
pref(webgl.force-layers-readback,true) == webgl-hanging-fb-test.html?readback&__&preserve wrapper.html?green.png
pref(webgl.force-layers-readback,true) == webgl-hanging-fb-test.html?readback&aa&preserve wrapper.html?green.png
# Check a smaller selection for readback:
pref(webgl.force-layers-readback,true) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?readback&__&_____&________ wrapper.html?colors.png # Bug 844439
pref(webgl.force-layers-readback,true) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?readback&aa&_____&________ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?readback&__&alpha&________ wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?readback&aa&alpha&________ wrapper.html?colors.png # Bug 844439
pref(webgl.force-layers-readback,true) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?readback&__&_____&preserve wrapper.html?colors.png # Bug 844439
pref(webgl.force-layers-readback,true) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?readback&aa&_____&preserve wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?readback&__&alpha&preserve wrapper.html?colors.png # Bug 844439
random-if(gtk2Widget) pref(webgl.force-layers-readback,true) random-if(B2G) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?readback&aa&alpha&preserve wrapper.html?colors.png # Bug 844439
# Check alpha behavior:
fuzzy-if(B2G,256,83) random-if(Android&&AndroidVersion<15) == webgl-color-alpha-test.html?colorVal=1.0&alphaVal=1.0 wrapper.html?colors.png
# These tests don't use wrapper.html, as there appear to be invalidation issues with black.png and async image decoding - Bug 803299
random-if(Android&&AndroidVersion<15) == webgl-color-alpha-test.html?colorVal=0.0&alphaVal=1.0 black.html
fuzzy-if(B2G,256,83) random-if(Android&&AndroidVersion<15) == webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.0 wrapper.html?colors.png
random-if(Android&&AndroidVersion<15) == webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.0&alpha wrapper.html?white.png
fuzzy(1,65536) fuzzy-if(B2G,256,83) fuzzy-if(Android||B2G,9,65536) random-if(Android&&AndroidVersion<15) == webgl-color-alpha-test.html?colorVal=0.5&alphaVal=1.0 wrapper.html?half-colors.png
# Test premult:
# random-if(B2G) from bug 983650
# Mark as failing on WinXP (winWidget&&!d2d), because Try said so. WFM outside of Try.
# This might work on WinXP again if OMTC is disabled.
fuzzy(1,65536) random-if(gtk2Widget) random-if(winWidget&&!d2d) random-if(B2G) fuzzy-if(Android,9,65536) random-if(Android&&AndroidVersion<15) == webgl-color-alpha-test.html?colorVal=1.0&alphaVal=0.5&alpha wrapper.html?colors-half-alpha.png
fuzzy(1,65536) random-if(gtk2Widget) fails-if(winWidget&&!d2d) fuzzy-if(Android,9,65536) random-if(Android&&AndroidVersion<15) == webgl-color-alpha-test.html?colorVal=0.5&alphaVal=0.5&alpha wrapper.html?half-colors-half-alpha.png
# random-if(B2G) from bug 983650
fuzzy(1,65536) random-if(B2G) fuzzy-if(Android,9,65536) random-if(Android&&AndroidVersion<15) == webgl-color-alpha-test.html?colorVal=0.5&alphaVal=0.5&alpha&premult wrapper.html?colors-half-alpha.png
# Check for hanging framebuffer bindings:
random-if(Android&&AndroidVersion<15) == webgl-hanging-fb-test.html?__&________ wrapper.html?green.png
random-if(Android&&AndroidVersion<15) == webgl-hanging-fb-test.html?aa&________ wrapper.html?green.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-hanging-fb-test.html?__&readback wrapper.html?green.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-hanging-fb-test.html?aa&readback wrapper.html?green.png
random-if(Android&&AndroidVersion<15) == webgl-hanging-scissor-test.html?__&________ wrapper.html?green.png
random-if(Android&&AndroidVersion<15) == webgl-hanging-scissor-test.html?aa&________ wrapper.html?green.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-hanging-scissor-test.html?__&readback wrapper.html?green.png
pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-hanging-scissor-test.html?aa&readback wrapper.html?green.png
== webgl-hanging-scissor-test.html?__ wrapper.html?green.png
== webgl-hanging-scissor-test.html?aa wrapper.html?green.png
pref(webgl.force-layers-readback,true) == webgl-hanging-scissor-test.html?readback&__ wrapper.html?green.png
pref(webgl.force-layers-readback,true) == webgl-hanging-scissor-test.html?readback&aa wrapper.html?green.png
# Check that our experimental prefs still work:
# 16bpp:
skip-if(winWidget) pref(webgl.prefer-16bpp,true) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?16bpp wrapper.html?colors.png
skip-if(winWidget) pref(webgl.prefer-16bpp,true) pref(webgl.force-layers-readback,true) random-if(Android&&AndroidVersion<15) == webgl-color-test.html?16bpp&readback wrapper.html?colors.png
# 16bpp for Android/B2G: [16bpp] * PowerSet([readback, premult, alpha])
# RGB565 dithers 127 to [123,132]. (Max error: 5)
# RGBA4444 dithers 128 to [119,136], and 191 to [192]. (Max error: 9)
fuzzy(5,30000) skip-if(!(Android||B2G)) pref(webgl.prefer-16bpp,true) == webgl-color-test.html?16bpp&________&_______&_____ wrapper.html?colors-no-alpha.png
fuzzy(5,30000) skip-if(!(Android||B2G)) pref(webgl.prefer-16bpp,true) pref(webgl.force-layers-readback,true) == webgl-color-test.html?16bpp&readback&_______&_____ wrapper.html?colors-no-alpha.png
fuzzy(5,30000) skip-if(!(Android||B2G)) pref(webgl.prefer-16bpp,true) == webgl-color-test.html?16bpp&________&premult&_____ wrapper.html?colors-no-alpha.png
fuzzy(5,30000) skip-if(!(Android||B2G)) pref(webgl.prefer-16bpp,true) pref(webgl.force-layers-readback,true) == webgl-color-test.html?16bpp&readback&premult&_____ wrapper.html?colors-no-alpha.png
fuzzy(9,40000) skip-if(!(Android||B2G)) pref(webgl.prefer-16bpp,true) == webgl-color-test.html?16bpp&________&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(9,40000) skip-if(!(Android||B2G)) pref(webgl.prefer-16bpp,true) pref(webgl.force-layers-readback,true) == webgl-color-test.html?16bpp&readback&_______&alpha wrapper.html?colors-non-premult.png
fuzzy(9,40000) skip-if(!(Android||B2G)) pref(webgl.prefer-16bpp,true) == webgl-color-test.html?16bpp&________&premult&alpha wrapper.html?colors-premult.png
fuzzy(9,40000) skip-if(!(Android||B2G)) pref(webgl.prefer-16bpp,true) pref(webgl.force-layers-readback,true) == webgl-color-test.html?16bpp&readback&premult&alpha wrapper.html?colors-premult.png
# Force native GL (Windows):
skip-if(!winWidget) pref(webgl.disable-angle,true) == webgl-clear-test.html?native-gl wrapper.html?green.png
skip-if(!winWidget) pref(webgl.disable-angle,true) == webgl-orientation-test.html?native-gl wrapper.html?white-top-left.png
skip-if(!winWidget) pref(webgl.disable-angle,true) == webgl-color-test.html?native-gl wrapper.html?colors.png
skip-if(!winWidget) pref(webgl.disable-angle,true) pref(webgl.prefer-16bpp,true) == webgl-color-test.html?native-gl&16bpp wrapper.html?colors.png
skip-if(!winWidget) pref(webgl.disable-angle,true) == webgl-color-test.html?native-gl wrapper.html?colors-no-alpha.png
# Non-WebGL Reftests!

View File

@ -1,50 +1,40 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset='UTF-8'>
<!--
Clear the canvas to green to test that we get pixels to the screen.
If this fails, something is seriously wrong.
-->
<html>
<head>
<meta charset="UTF-8">
<script type='text/javascript' src='webgl-utils.js'></script>
<script type='text/javascript'>
'use strict';
<script type="text/javascript" src="webgl-utils.js"></script>
<script type="text/javascript">
/* Clear Test
*
* Clear the canvas to green to test that we get pixels to the screen.
*/
"use strict";
function renderGL(gl) {
gl.clearColor(0.0, 1.0, 0.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.finish();
}
function renderFailure(canvas) {
// This will also trigger RAF for us.
var context = canvas.getContext("2d");
context.fillText('WebGL failed.', 64, 64);
function setStatus(text) {
var elem = document.getElementById('status');
elem.innerHTML = text;
}
function runTest() {
var canvas = document.getElementById("canvas");
var canvas = document.getElementById('canvas');
var gl = initGL(canvas);
if (!gl) {
setStatus('WebGL context creation failed.');
return;
}
if (gl)
renderGL(gl);
else
renderFailure(canvas);
waitForComposite(testComplete);
gl.clearColor(0.0, 1.0, 0.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT);
}
function testComplete() {
document.documentElement.removeAttribute("class");
}
</script>
</script>
</head>
<body onload="rAF(runTest);">
<canvas id="canvas" width="256" height="256"></canvas>
<body onload='runTest();'>
<canvas id='canvas' width='256' height='256'></canvas>
<div id='status'></div>
</body>
</html>

View File

@ -1,81 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="webgl-utils.js"></script>
<script type="text/javascript">
/* Color-Alpha Test
*
* Clear the four quadrants of the canvas as follows:
* +------+------+
* | red |green |
* | | |
* +------+------+
* | blue |white |
* | | |
* +------+------+
* However, unlike the Color test, clear with a given alpha value.
* What effect this has depends on the context-creation args passed
* to this page.
*
* Here we check that we handle various combinations of alpha and
* premultipliedAlpha correctly.
*/
"use strict";
function renderGL(gl, value, alpha) {
gl.enable(gl.SCISSOR_TEST);
gl.scissor(0, 128, 128, 128);
gl.clearColor(value, 0.0, 0.0, alpha);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(128, 128, 128, 128);
gl.clearColor(0.0, value, 0.0, alpha);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(0, 0, 128, 128);
gl.clearColor(0.0, 0.0, value, alpha);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(128, 0, 128, 128);
gl.clearColor(value, value, value, alpha);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.finish();
}
function renderFailure(canvas) {
// This will also trigger RAF for us.
var context = canvas.getContext("2d");
context.fillText('WebGL failed.', 64, 64);
}
function runTest() {
var canvas = document.getElementById("canvas");
var gl = initGL(canvas);
var value = arg("colorVal");
var alpha = arg("alphaVal");
if (gl)
renderGL(gl, value, alpha);
else
renderFailure(canvas);
waitForComposite(testComplete);
}
function testComplete() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="rAF(runTest);">
<canvas id="canvas" width="256" height="256"></canvas>
</body>
</html>

View File

@ -1,76 +1,123 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset='UTF-8'>
<!--
Color Test
Clear the four quadrants of the canvas as follows:
+------+------+
| blue |black |
| | |
+------+------+
| red |green |
| | |
+------+------+
Clear with a given alpha value. What effect this has depends on the
context-creation args passed to this page.
-->
<html class='reftest-wait'>
<head>
<meta charset="UTF-8">
<script type='text/javascript' src='webgl-utils.js'></script>
<script type='text/javascript'>
'use strict';
<script type="text/javascript" src="webgl-utils.js"></script>
<script type="text/javascript">
/* Color Test
*
* Clear the four quadrants of the canvas as follows:
* +------+------+
* | red |green |
* | | |
* +------+------+
* | blue |white |
* | | |
* +------+------+
*
* This is for checking that we're getting the right colors when
* we ask for them. This combined with the Orientation test assure
* that we are getting the correct colors in the correct places.
*/
var COLOR_VALUE = 127.0 / 255.0;
var ALPHA_VALUE = 127.0 / 255.0;
"use strict";
function renderGL(gl) {
function renderFrame(gl) {
gl.enable(gl.SCISSOR_TEST);
gl.scissor(0, 128, 128, 128);
gl.clearColor(1.0, 0.0, 0.0, 1.0);
gl.scissor(0, 0, 100, 100);
gl.clearColor(COLOR_VALUE, 0.0, 0.0, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(128, 128, 128, 128);
gl.clearColor(0.0, 1.0, 0.0, 1.0);
gl.scissor(100, 0, 100, 100);
gl.clearColor(0.0, COLOR_VALUE, 0.0, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(0, 0, 128, 128);
gl.clearColor(0.0, 0.0, 1.0, 1.0);
gl.scissor(0, 100, 100, 100);
gl.clearColor(0.0, 0.0, COLOR_VALUE, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(128, 0, 128, 128);
gl.clearColor(1.0, 1.0, 1.0, 1.0);
gl.scissor(100, 100, 100, 100);
gl.clearColor(0.0, 0.0, 0.0, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.finish();
}
function renderFailure(canvas) {
// This will also trigger RAF for us.
var context = canvas.getContext("2d");
context.fillText('WebGL failed.', 64, 64);
////////////////////////////////////////////////////////////////////////////////
// Boilerplate
var TIMEOUT_MS = 10 * 1000;
function setStatus(text) {
var elem = document.getElementById('status');
elem.innerHTML = text;
}
var gIsComplete = false;
function markComplete(statusText) {
if (!statusText)
statusText = '';
if (gIsComplete)
return;
gIsComplete = true;
setStatus(statusText);
document.documentElement.removeAttribute('class');
}
function markError(text) {
markComplete('Error: ' + text);
}
function markTimedOut() {
markError('Timed out waiting on test completion.');
}
function runFrame(gl, frameCount, maxFrameCount) {
renderFrame(gl);
frameCount++;
if (frameCount >= maxFrameCount) {
console.log('Rendered ' + frameCount + ' frames.');
markComplete();
return;
}
requestAnimationFrame(function(){
runFrame(gl, frameCount, maxFrameCount);
});
}
function runTest() {
var canvas = document.getElementById("canvas");
var canvas = document.getElementById('canvas');
var gl = initGL(canvas);
if (!gl) {
markError('WebGL context creation failed.');
return;
}
if (gl)
renderGL(gl);
else
renderFailure(canvas);
var maxFrameCount = arg('frame', 1);
if (maxFrameCount < 1) {
markError('Invalid `frame` arg: ' + maxFrameCount);
return;
}
waitForComposite(testComplete);
setStatus('Waiting...');
runFrame(gl, 0, maxFrameCount);
setTimeout(markTimedOut, TIMEOUT_MS);
}
function testComplete() {
document.documentElement.removeAttribute("class");
}
</script>
</script>
</head>
<body onload="rAF(runTest);">
<canvas id="canvas" width="256" height="256"></canvas>
<body onload='runTest();'>
<canvas id='canvas' width='200' height='200'></canvas>
<div id='status'></div>
</body>
</html>

View File

@ -1,57 +0,0 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="webgl-utils.js"></script>
<script type="text/javascript">
/* Orientation Test
*
* Clear the canvas to black, and clear the upper-left quadrant
* to white. If this doesn't pass, but the Clear test does, then
* likely y-flip is wrong.
*/
"use strict";
function renderGL(gl) {
gl.clearColor(0.0, 0.0, 0.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.enable(gl.SCISSOR_TEST);
gl.scissor(0, 128, 128, 128);
gl.clearColor(1.0, 1.0, 1.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.finish();
}
function renderFailure(canvas) {
// This will also trigger RAF for us.
var context = canvas.getContext("2d");
context.fillText('WebGL failed.', 64, 64);
}
function runTest() {
var canvas = document.getElementById("canvas");
var gl = initGL(canvas);
if (gl)
renderGL(gl);
else
renderFailure(canvas);
waitForComposite(testComplete);
}
function testComplete() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="rAF(runTest);">
<canvas id="canvas" width="256" height="256"></canvas>
</body>
</html>

View File

@ -22,16 +22,15 @@ function parseArgs() {
}
var gArgs = null;
function arg(key) {
function arg(key, defaultVal) {
if (gArgs === null) {
gArgs = parseArgs();
}
var ret = gArgs[key];
if (ret === undefined)
ret = false;
if (!(key in gArgs))
return defaultVal;
return ret;
return gArgs[key];
}
function initGL(canvas) {
@ -40,12 +39,12 @@ function initGL(canvas) {
var gl = null;
var withAA = arg("aa");
var withAlpha = arg("alpha");
var withDepth = arg("depth");
var withPremult = arg("premult");
var withPreserve = arg("preserve");
var withStencil = arg("stencil");
var withAA = arg("aa", false);
var withAlpha = arg("alpha", false);
var withDepth = arg("depth", false);
var withPremult = arg("premult", false);
var withPreserve = arg("preserve", false);
var withStencil = arg("stencil", false);
try {
var argDict = {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -452,7 +452,16 @@ GLScreenBuffer::Swap(const gfx::IntSize& size)
{
auto src = mFront->Surf();
auto dest = mBack->Surf();
//uint32_t srcPixel = ReadPixel(src);
//uint32_t destPixel = ReadPixel(dest);
//printf_stderr("Before: src: 0x%08x, dest: 0x%08x\n", srcPixel, destPixel);
SharedSurface::ProdCopy(src, dest, mFactory.get());
//srcPixel = ReadPixel(src);
//destPixel = ReadPixel(dest);
//printf_stderr("After: src: 0x%08x, dest: 0x%08x\n", srcPixel, destPixel);
}
return true;

View File

@ -553,5 +553,25 @@ ReadbackSharedSurface(SharedSurface* src, gfx::DrawTarget* dst)
return true;
}
uint32_t
ReadPixel(SharedSurface* src)
{
GLContext* gl = src->mGL;
uint32_t pixel;
ScopedReadbackFB a(src);
{
ScopedPackAlignment autoAlign(gl, 4);
UniquePtr<uint8_t[]> bytes(new uint8_t[4]);
gl->raw_fReadPixels(0, 0, 1, 1, LOCAL_GL_RGBA, LOCAL_GL_UNSIGNED_BYTE,
bytes.get());
memcpy(&pixel, bytes.get(), 4);
}
return pixel;
}
} /* namespace gfx */
} /* namespace mozilla */

View File

@ -289,6 +289,7 @@ public:
};
bool ReadbackSharedSurface(SharedSurface* src, gfx::DrawTarget* dst);
uint32_t ReadPixel(SharedSurface* src);
} // namespace gl
} // namespace mozilla