Skip to content

Commit d71ef77

Browse files
committed
1 parent 864417d commit d71ef77

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ block = "0.1.6"
3535
foreign-types = "0.5"
3636
dispatch = { version = "0.2", optional = true }
3737
paste = "1"
38+
io-surface = { git = "https://github.com/servo/core-foundation-rs" }
3839

3940
[dependencies.objc]
4041
version = "0.2.4"

src/device.rs

+13
Original file line numberDiff line numberDiff line change
@@ -1985,6 +1985,19 @@ impl DeviceRef {
19851985
unsafe { msg_send![self, newTextureWithDescriptor: descriptor] }
19861986
}
19871987

1988+
pub fn new_texture_with_descriptor_and_iosurface(
1989+
&self,
1990+
descriptor: &TextureDescriptorRef,
1991+
iosurface: io_surface::IOSurfaceRef,
1992+
plane: NSUInteger,
1993+
) -> Texture {
1994+
unsafe {
1995+
msg_send![self, newTextureWithDescriptor:descriptor
1996+
iosurface:iosurface
1997+
plane:plane]
1998+
}
1999+
}
2000+
19882001
pub fn new_sampler(&self, descriptor: &SamplerDescriptorRef) -> SamplerState {
19892002
unsafe { msg_send![self, newSamplerStateWithDescriptor: descriptor] }
19902003
}

0 commit comments

Comments
 (0)