@@ -6894,7 +6894,7 @@ pub type ImageCopyTexture<T> = TexelCopyTextureInfo<T>;
68946894///
68956895/// Corresponds to [WebGPU `GPUCopyExternalImageSourceInfo`](
68966896/// https://gpuweb.github.io/gpuweb/#dictdef-gpuimagecopyexternalimage).
6897- #[ cfg( target_arch = "wasm32" ) ]
6897+ #[ cfg( all ( target_arch = "wasm32" , feature = "web" ) ) ]
68986898#[ derive( Clone , Debug ) ]
68996899pub struct CopyExternalImageSourceInfo {
69006900 /// The texture to be copied from. The copy source data is captured at the moment
@@ -6918,14 +6918,14 @@ pub struct CopyExternalImageSourceInfo {
69186918 since = "24.0.0" ,
69196919 note = "This has been renamed to `CopyExternalImageSourceInfo`, and will be removed in 25.0.0."
69206920) ]
6921- #[ cfg( target_arch = "wasm32" ) ]
6921+ #[ cfg( all ( target_arch = "wasm32" , feature = "web" ) ) ]
69226922pub type ImageCopyExternalImage = CopyExternalImageSourceInfo ;
69236923
69246924/// Source of an external texture copy.
69256925///
69266926/// Corresponds to the [implicit union type on WebGPU `GPUCopyExternalImageSourceInfo.source`](
69276927/// https://gpuweb.github.io/gpuweb/#dom-gpuimagecopyexternalimage-source).
6928- #[ cfg( target_arch = "wasm32" ) ]
6928+ #[ cfg( all ( target_arch = "wasm32" , feature = "web" ) ) ]
69296929#[ derive( Clone , Debug ) ]
69306930pub enum ExternalImageSource {
69316931 /// Copy from a previously-decoded image bitmap.
@@ -6947,7 +6947,7 @@ pub enum ExternalImageSource {
69476947 VideoFrame ( web_sys:: VideoFrame ) ,
69486948}
69496949
6950- #[ cfg( target_arch = "wasm32" ) ]
6950+ #[ cfg( all ( target_arch = "wasm32" , feature = "web" ) ) ]
69516951impl ExternalImageSource {
69526952 /// Gets the pixel, not css, width of the source.
69536953 pub fn width ( & self ) -> u32 {
@@ -6978,7 +6978,7 @@ impl ExternalImageSource {
69786978 }
69796979}
69806980
6981- #[ cfg( target_arch = "wasm32" ) ]
6981+ #[ cfg( all ( target_arch = "wasm32" , feature = "web" ) ) ]
69826982impl core:: ops:: Deref for ExternalImageSource {
69836983 type Target = js_sys:: Object ;
69846984
@@ -6998,12 +6998,14 @@ impl core::ops::Deref for ExternalImageSource {
69986998
69996999#[ cfg( all(
70007000 target_arch = "wasm32" ,
7001+ feature = "web" ,
70017002 feature = "fragile-send-sync-non-atomic-wasm" ,
70027003 not( target_feature = "atomics" )
70037004) ) ]
70047005unsafe impl Send for ExternalImageSource { }
70057006#[ cfg( all(
70067007 target_arch = "wasm32" ,
7008+ feature = "web" ,
70077009 feature = "fragile-send-sync-non-atomic-wasm" ,
70087010 not( target_feature = "atomics" )
70097011) ) ]
0 commit comments