This repository was archived by the owner on Feb 16, 2025. It is now read-only.
Commit 5d2b91d 1 parent 84c3022 commit 5d2b91d Copy full SHA for 5d2b91d
File tree 3 files changed +10
-9
lines changed
3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ use euclid::Rect;
10
10
use euclid:: Size2D ;
11
11
12
12
use std:: fmt:: Debug ;
13
+ use std:: num:: NonZero ;
14
+ use std:: num:: NonZeroU32 ;
13
15
use std:: sync:: atomic:: AtomicUsize ;
14
16
use std:: sync:: atomic:: Ordering ;
15
17
@@ -288,9 +290,8 @@ pub struct SubImages {
288
290
#[ derive( Clone , Debug ) ]
289
291
#[ cfg_attr( feature = "ipc" , derive( Deserialize , Serialize ) ) ]
290
292
pub struct SubImage {
291
- pub color_texture : u32 ,
292
- // TODO: make this Option<NonZeroU32>
293
- pub depth_stencil_texture : Option < u32 > ,
293
+ pub color_texture : Option < NonZeroU32 > ,
294
+ pub depth_stencil_texture : Option < NonZeroU32 > ,
294
295
pub texture_array_index : Option < u32 > ,
295
296
pub viewport : Rect < i32 , Viewport > ,
296
297
}
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ log = "0.4.6"
34
34
openxr = { version = " 0.19" , optional = true }
35
35
serde = { version = " 1.0" , optional = true }
36
36
glow = " 0.16"
37
- surfman = { git = " https://github.com/servo /surfman" , rev = " c8d6b4b65aeab739ee7651602e29c8d58ceee123 " , features = [
37
+ surfman = { git = " https://github.com/sagudev /surfman" , branch = " no_gl_gen " , features = [
38
38
" chains" ,
39
39
] }
40
40
Original file line number Diff line number Diff line change @@ -163,8 +163,8 @@ impl LayerManagerAPI<SurfmanGL> for SurfmanLayerManager {
163
163
let texture_array_index = None ;
164
164
let origin = Point2D :: new ( 0 , 0 ) ;
165
165
let sub_image = Some ( SubImage {
166
- color_texture,
167
- depth_stencil_texture : depth_stencil_texture. map ( |nt| nt. 0 . get ( ) ) ,
166
+ color_texture : color_texture . map ( |nt| nt . 0 ) ,
167
+ depth_stencil_texture : depth_stencil_texture. map ( |nt| nt. 0 ) ,
168
168
texture_array_index,
169
169
viewport : Rect :: new ( origin, surface_size) ,
170
170
} ) ;
@@ -173,8 +173,8 @@ impl LayerManagerAPI<SurfmanGL> for SurfmanLayerManager {
173
173
. viewports
174
174
. iter ( )
175
175
. map ( |& viewport| SubImage {
176
- color_texture,
177
- depth_stencil_texture : depth_stencil_texture. map ( |texture| texture. 0 . get ( ) ) ,
176
+ color_texture : color_texture . map ( |nt| nt . 0 ) ,
177
+ depth_stencil_texture : depth_stencil_texture. map ( |texture| texture. 0 ) ,
178
178
texture_array_index,
179
179
viewport,
180
180
} )
@@ -185,7 +185,7 @@ impl LayerManagerAPI<SurfmanGL> for SurfmanLayerManager {
185
185
contexts,
186
186
context_id,
187
187
layer_id,
188
- NonZeroU32 :: new ( color_texture) . map ( gl :: NativeTexture ) ,
188
+ color_texture,
189
189
color_target,
190
190
depth_stencil_texture,
191
191
) ;
You can’t perform that action at this time.
0 commit comments