mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
fix: bring back connection method to fix WebGL texture error (#35358)
* Bring back connection method to fix texture error Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Print GL info in log instead Signed-off-by: Wu Yuwei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yuwei <yuweiwu@pm.me>
This commit is contained in:
parent
7a6953bc08
commit
b5b69988cc
3 changed files with 15 additions and 1 deletions
|
@ -67,6 +67,11 @@ pub trait RenderingContext {
|
|||
fn destroy_texture(&self, _surface_texture: SurfaceTexture) -> Option<Surface> {
|
||||
None
|
||||
}
|
||||
|
||||
/// The connection to the display server for WebGL. Default to `None`.
|
||||
fn connection(&self) -> Option<Connection> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
/// A rendering context that uses the Surfman library to create and manage
|
||||
|
@ -223,6 +228,10 @@ impl RenderingContext for SurfmanRenderingContext {
|
|||
fn destroy_texture(&self, surface_texture: SurfaceTexture) -> Option<Surface> {
|
||||
self.destroy_surface_texture(surface_texture).ok()
|
||||
}
|
||||
|
||||
fn connection(&self) -> Option<Connection> {
|
||||
Some(self.connection())
|
||||
}
|
||||
}
|
||||
|
||||
impl SurfmanRenderingContext {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue