mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1633935 - P7 refactor bitmap test, r=jgilbert
Given options in createImageBitmap is not supported, the test coverage is the same. Depends on D76973 Differential Revision: https://phabricator.services.mozilla.com/D77749
This commit is contained in:
parent
4a986df77d
commit
d07e9d5daf
@ -386,21 +386,11 @@ function runImageBitmapTestInternal(bitmaps, alphaVal, internalFormat, pixelForm
|
||||
|
||||
function runImageBitmapTest(source, alphaVal, internalFormat, pixelFormat, pixelType, gl, tiu, wtu, is3D)
|
||||
{
|
||||
var p1 = createImageBitmap(source, {imageOrientation: "none", premultiplyAlpha: "premultiply"})
|
||||
.then(cur => { cur.flipY = false; cur.premultiply = true; return cur; });
|
||||
var p2 = createImageBitmap(source, {imageOrientation: "none", premultiplyAlpha: "none"})
|
||||
.then(cur => { cur.flipY = false; cur.premultiply = false; return cur; });
|
||||
var p3 = createImageBitmap(source, {imageOrientation: "flipY", premultiplyAlpha: "premultiply"})
|
||||
.then(cur => { cur.flipY = true; cur.premultiply = true; return cur; });
|
||||
var p4 = createImageBitmap(source, {imageOrientation: "flipY", premultiplyAlpha: "none"})
|
||||
.then(cur => { cur.flipY = true; cur.premultiply = false; return cur; });
|
||||
return Promise.all([p1, p2, p3, p4])
|
||||
.catch( () => {
|
||||
testPassed("createImageBitmap with options may be rejected if it is not supported. Retrying without options.");
|
||||
var p = createImageBitmap(source)
|
||||
.then(cur => { cur.flipY = false; cur.premultiply = false; return cur; });
|
||||
return Promise.all([p]);
|
||||
}).then( bitmaps => {
|
||||
var p = createImageBitmap(source)
|
||||
.then(cur => { cur.flipY = false; cur.premultiply = false; return cur; });
|
||||
|
||||
return Promise.all([p])
|
||||
.then( bitmaps => {
|
||||
bufferedLogToConsole("All createImageBitmap promises are resolved");
|
||||
runImageBitmapTestInternal(bitmaps, alphaVal, internalFormat, pixelFormat, pixelType, gl, tiu, wtu, is3D);
|
||||
}, (e) => {
|
||||
|
Loading…
Reference in New Issue
Block a user