File tree Expand file tree Collapse file tree 4 files changed +11
-18
lines changed Expand file tree Collapse file tree 4 files changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ Bottom level categories:
4040
4141## Unreleased
4242
43+ ### Bug Fixes
44+
45+ #### WebGPU
46+
47+ * Fix crash when calling ` create_surface_from_canvas ` . By @grovesNL in [ #3718 ] ( https://github.com/gfx-rs/wgpu/pull/3718 )
48+
4349## v0.16.0 (2023-04-19)
4450
4551### Major changes
Original file line number Diff line number Diff line change @@ -63,19 +63,6 @@ impl<T> From<Identified<T>> for ObjectId {
6363 }
6464}
6565
66- #[ allow( unused_variables) ]
67- impl < T > From < ( Identified < T > , Sendable < T > ) > for ObjectId {
68- fn from ( ( id, _data) : ( Identified < T > , Sendable < T > ) ) -> Self {
69- Self :: new (
70- // TODO: the ID isn't used, so we hardcode it to 1 for now until we rework this
71- // API.
72- core:: num:: NonZeroU64 :: new ( 1 ) . unwrap ( ) ,
73- #[ cfg( feature = "expose-ids" ) ]
74- id. 0 ,
75- )
76- }
77- }
78-
7966#[ derive( Clone , Debug ) ]
8067pub ( crate ) struct Sendable < T > ( T ) ;
8168unsafe impl < T > Send for Sendable < T > { }
Original file line number Diff line number Diff line change @@ -1004,7 +1004,7 @@ pub struct ObjectId {
10041004}
10051005
10061006impl ObjectId {
1007- const UNUSED : Self = ObjectId {
1007+ pub ( crate ) const UNUSED : Self = ObjectId {
10081008 id : None ,
10091009 #[ cfg( feature = "expose-ids" ) ]
10101010 global_id : None ,
Original file line number Diff line number Diff line change @@ -1616,9 +1616,9 @@ impl Instance {
16161616 #[ cfg( any( not( target_arch = "wasm32" ) , feature = "webgl" ) ) ]
16171617 data : Box :: new ( surface) ,
16181618 #[ cfg( all( target_arch = "wasm32" , not( feature = "webgl" ) ) ) ]
1619- id : ObjectId :: from ( surface ) ,
1619+ id : ObjectId :: UNUSED ,
16201620 #[ cfg( all( target_arch = "wasm32" , not( feature = "webgl" ) ) ) ]
1621- data : Box :: new ( ( ) ) ,
1621+ data : Box :: new ( surface . 1 ) ,
16221622 config : Mutex :: new ( None ) ,
16231623 } )
16241624 }
@@ -1652,9 +1652,9 @@ impl Instance {
16521652 #[ cfg( any( not( target_arch = "wasm32" ) , feature = "webgl" ) ) ]
16531653 data : Box :: new ( surface) ,
16541654 #[ cfg( all( target_arch = "wasm32" , not( feature = "webgl" ) ) ) ]
1655- id : ObjectId :: from ( surface ) ,
1655+ id : ObjectId :: UNUSED ,
16561656 #[ cfg( all( target_arch = "wasm32" , not( feature = "webgl" ) ) ) ]
1657- data : Box :: new ( ( ) ) ,
1657+ data : Box :: new ( surface . 1 ) ,
16581658 config : Mutex :: new ( None ) ,
16591659 } )
16601660 }
You can’t perform that action at this time.
0 commit comments