mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Return an empty typed array from gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS)
This commit is contained in:
parent
31774e9203
commit
f0ca100e87
5 changed files with 11 additions and 24 deletions
|
@ -55,7 +55,7 @@ use js::jsapi::{JSContext, JSObject, Type};
|
|||
use js::jsval::{BooleanValue, DoubleValue, Int32Value, UInt32Value, JSVal};
|
||||
use js::jsval::{ObjectValue, NullValue, UndefinedValue};
|
||||
use js::rust::CustomAutoRooterGuard;
|
||||
use js::typedarray::{ArrayBufferView, CreateWith, Float32Array, Int32Array};
|
||||
use js::typedarray::{ArrayBufferView, CreateWith, Float32Array, Int32Array, Uint32Array};
|
||||
use net_traits::image::base::PixelFormat;
|
||||
use net_traits::image_cache::ImageResponse;
|
||||
use offscreen_gl_context::{GLContextAttributes, GLLimits};
|
||||
|
@ -1332,6 +1332,16 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
return Int32Value(constants::UNSIGNED_BYTE as i32);
|
||||
}
|
||||
}
|
||||
constants::COMPRESSED_TEXTURE_FORMATS => {
|
||||
// FIXME(nox): https://github.com/servo/servo/issues/20594
|
||||
rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
|
||||
let _ = Uint32Array::create(
|
||||
cx,
|
||||
CreateWith::Slice(&[]),
|
||||
rval.handle_mut(),
|
||||
).unwrap();
|
||||
return ObjectValue(rval.get());
|
||||
}
|
||||
constants::VERSION => {
|
||||
rooted!(in(cx) let mut rval = UndefinedValue());
|
||||
"WebGL 1.0".to_jsval(cx, rval.handle_mut());
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[webgl-compressed-texture-atc.html]
|
||||
type: testharness
|
||||
[WebGL test #1: gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) should be . Was null.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[webgl-compressed-texture-pvrtc.html]
|
||||
type: testharness
|
||||
[WebGL test #1: gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) should be . Was null.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[webgl-compressed-texture-s3tc.html]
|
||||
type: testharness
|
||||
[WebGL test #1: gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) should be . Was null.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[gl-get-calls.html]
|
||||
type: testharness
|
||||
[WebGL test #20: context.getParameter(context.COMPRESSED_TEXTURE_FORMATS) is not an instance of Uint32Array]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #310: context.getError() should be 0. Was 1280.]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue