Revert "Use surfman with glow bindings (#34328)" (#35402)

This reverts commit 503bb10c5b.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2025-02-10 18:20:27 +01:00 committed by GitHub
parent 90130315a7
commit 0fed99590a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 97 additions and 69 deletions

View file

@ -5,6 +5,7 @@
//! An implementation of layer management using surfman
use std::collections::HashMap;
use std::num::NonZeroU32;
use euclid::{Point2D, Rect, Size2D};
use glow::{self as gl, Context as Gl, HasContext, PixelUnpackData};
@ -164,8 +165,8 @@ impl LayerManagerAPI<SurfmanGL> for SurfmanLayerManager {
let texture_array_index = None;
let origin = Point2D::new(0, 0);
let sub_image = Some(SubImage {
color_texture: color_texture.map(|nt| nt.0),
depth_stencil_texture: depth_stencil_texture.map(|nt| nt.0),
color_texture,
depth_stencil_texture: depth_stencil_texture.map(|nt| nt.0.get()),
texture_array_index,
viewport: Rect::new(origin, surface_size),
});
@ -174,8 +175,8 @@ impl LayerManagerAPI<SurfmanGL> for SurfmanLayerManager {
.viewports
.iter()
.map(|&viewport| SubImage {
color_texture: color_texture.map(|nt| nt.0),
depth_stencil_texture: depth_stencil_texture.map(|texture| texture.0),
color_texture,
depth_stencil_texture: depth_stencil_texture.map(|texture| texture.0.get()),
texture_array_index,
viewport,
})
@ -186,7 +187,7 @@ impl LayerManagerAPI<SurfmanGL> for SurfmanLayerManager {
contexts,
context_id,
layer_id,
color_texture,
NonZeroU32::new(color_texture).map(gl::NativeTexture),
color_target,
depth_stencil_texture,
);