mirror of
https://github.com/servo/servo.git
synced 2025-06-17 21:04:28 +00:00
Auto merge of #27168 - jdm:gl-fake-context-lost, r=Manishearth
Add stub isContextLost API. We don't support losing contexts yet, so it's not lying to say that the context is never lost. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #27116 - [x] There are tests for these changes
This commit is contained in:
commit
22a7522a04
7 changed files with 17 additions and 24 deletions
|
@ -1119,6 +1119,11 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
|
|||
self.base.GetContextAttributes()
|
||||
}
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.13
|
||||
fn IsContextLost(&self) -> bool {
|
||||
self.base.IsContextLost()
|
||||
}
|
||||
|
||||
/// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.14
|
||||
fn GetSupportedExtensions(&self) -> Option<Vec<DOMString>> {
|
||||
self.base.GetSupportedExtensions()
|
||||
|
|
|
@ -2319,6 +2319,11 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
})
|
||||
}
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.13
|
||||
fn IsContextLost(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.14
|
||||
fn GetSupportedExtensions(&self) -> Option<Vec<DOMString>> {
|
||||
self.extension_manager
|
||||
|
|
|
@ -470,8 +470,7 @@ interface mixin WebGLRenderingContextBase
|
|||
readonly attribute GLsizei drawingBufferHeight;
|
||||
|
||||
[WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes();
|
||||
// FIXME: https://github.com/servo/servo/issues/15266
|
||||
// [WebGLHandlesContextLoss] boolean isContextLost();
|
||||
[WebGLHandlesContextLoss] boolean isContextLost();
|
||||
|
||||
sequence<DOMString>? getSupportedExtensions();
|
||||
object? getExtension(DOMString name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue